diff --git a/owlps-positioner/posutil.cc b/owlps-positioner/posutil.cc index 9a21208..885cec2 100644 --- a/owlps-positioner/posutil.cc +++ b/owlps-positioner/posutil.cc @@ -119,7 +119,7 @@ float PosUtil::similarity( /** * @param channel A IEEE 802.11 channel or frequency in MHz or 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. */ unsigned long PosUtil::wifi_channel_to_hz(const unsigned long &channel) diff --git a/owlps-positioner/tests/posutil_test.hh b/owlps-positioner/tests/posutil_test.hh index b131f99..7a0cb09 100644 --- a/owlps-positioner/tests/posutil_test.hh +++ b/owlps-positioner/tests/posutil_test.hh @@ -9,10 +9,8 @@ public: void test_wifi(void) { // Bad values - TS_ASSERT_EQUALS(PosUtil::wifi_channel_to_hz(0), - static_cast(0)) ; - TS_ASSERT_EQUALS(PosUtil::wifi_channel_to_hz(15), - static_cast(0)) ; + TS_ASSERT_THROWS(PosUtil::wifi_channel_to_hz(0), bad_channel) ; + TS_ASSERT_THROWS(PosUtil::wifi_channel_to_hz(15), bad_channel) ; // Good values for (unsigned int i = 1 ; i < 15 ; ++i)