[Positioner] tests: fix PosUtil
This commit is contained in:
parent
c188560575
commit
e2074cdb9b
|
@ -119,7 +119,7 @@ float PosUtil::similarity(
|
||||||
/**
|
/**
|
||||||
* @param channel A IEEE 802.11 channel or frequency in MHz or in Hz.
|
* @param channel A IEEE 802.11 channel or frequency in MHz or in Hz.
|
||||||
* @returns The frequency in Hz.
|
* @returns The frequency in Hz.
|
||||||
* @throw malformed_input_data if `channel` is not a valid channel or
|
* @throw bad_channel if `channel` is not a valid channel or
|
||||||
* frequency value.
|
* frequency value.
|
||||||
*/
|
*/
|
||||||
unsigned long PosUtil::wifi_channel_to_hz(const unsigned long &channel)
|
unsigned long PosUtil::wifi_channel_to_hz(const unsigned long &channel)
|
||||||
|
|
|
@ -9,10 +9,8 @@ public:
|
||||||
void test_wifi(void)
|
void test_wifi(void)
|
||||||
{
|
{
|
||||||
// Bad values
|
// Bad values
|
||||||
TS_ASSERT_EQUALS(PosUtil::wifi_channel_to_hz(0),
|
TS_ASSERT_THROWS(PosUtil::wifi_channel_to_hz(0), bad_channel) ;
|
||||||
static_cast<unsigned int>(0)) ;
|
TS_ASSERT_THROWS(PosUtil::wifi_channel_to_hz(15), bad_channel) ;
|
||||||
TS_ASSERT_EQUALS(PosUtil::wifi_channel_to_hz(15),
|
|
||||||
static_cast<unsigned int>(0)) ;
|
|
||||||
|
|
||||||
// Good values
|
// Good values
|
||||||
for (unsigned int i = 1 ; i < 15 ; ++i)
|
for (unsigned int i = 1 ; i < 15 ; ++i)
|
||||||
|
|
Loading…
Reference in New Issue