diff options
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/math_test.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/host/tests/math_test.cpp b/host/tests/math_test.cpp index c1b6793bb..1fb01f5c1 100644 --- a/host/tests/math_test.cpp +++ b/host/tests/math_test.cpp @@ -17,3 +17,10 @@ BOOST_AUTO_TEST_CASE(test_gcd) { BOOST_CHECK_EQUAL(uhd::math::gcd<int>(6, 15), 3); } + +BOOST_AUTO_TEST_CASE(test_sign) +{ + BOOST_CHECK_EQUAL(uhd::math::sign(2.3), +1); + BOOST_CHECK_EQUAL(uhd::math::sign(-2.3), -1); + BOOST_CHECK_EQUAL(uhd::math::sign(0.0), 0); +} |