diff options
Diffstat (limited to 'host/tests/narrow_cast_test.cpp')
-rw-r--r-- | host/tests/narrow_cast_test.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/tests/narrow_cast_test.cpp b/host/tests/narrow_cast_test.cpp index c108c310e..3ea7db1bf 100644 --- a/host/tests/narrow_cast_test.cpp +++ b/host/tests/narrow_cast_test.cpp @@ -11,11 +11,12 @@ using namespace uhd; -BOOST_AUTO_TEST_CASE(test_narrow){ +BOOST_AUTO_TEST_CASE(test_narrow) +{ uint16_t x = 5; - uint8_t y = narrow_cast<uint8_t>(x); + uint8_t y = narrow_cast<uint8_t>(x); BOOST_CHECK_EQUAL(x, y); - BOOST_CHECK_THROW(narrow<uint8_t>(uint16_t(1<<10)), narrowing_error); + BOOST_CHECK_THROW(narrow<uint8_t>(uint16_t(1 << 10)), narrowing_error); BOOST_CHECK_THROW(narrow<uint8_t>(int8_t(-1)), narrowing_error); } |