diff --git a/test/vx/test_bitformatting.cpp b/test/vx/test_bitformatting.cpp index 336a0b8977e72a4824a9164647db62b51d027b49..bb255206f3a361211d3ae9c091888a8093b2a9f5 100644 --- a/test/vx/test_bitformatting.cpp +++ b/test/vx/test_bitformatting.cpp @@ -5,6 +5,8 @@ using namespace libnux::vx; void test_reverse_byte() { + testcase_begin(__func__); + uint8_t byte_1 = 170; test_equal(reverse_byte(byte_1), 85); @@ -13,10 +15,14 @@ void test_reverse_byte() uint8_t byte_3 = 0; test_equal(reverse_byte(byte_3), 0); + + testcase_end(); } void test_vector_reverse_bytes() { + testcase_begin(__func__); + __vector uint8_t test_vector; for (uint8_t i = 0; i < sizeof(__vector uint8_t); i++) { @@ -28,6 +34,8 @@ void test_vector_reverse_bytes() for (uint8_t i = 0; i < sizeof(__vector uint8_t); i++) { test_equal(test_vector[i], reverse_byte(i)); } + + testcase_end(); } void start() diff --git a/test/vx/test_helper.cpp b/test/vx/test_helper.cpp index 5b3b98569a3d4004348937934ee66a749c84ed75..542a61d442393dd49f41c0b849888c6ab17fcd7b 100644 --- a/test/vx/test_helper.cpp +++ b/test/vx/test_helper.cpp @@ -7,6 +7,8 @@ using namespace libnux::vx; void test_abs_diff() { + testcase_begin(__func__); + uint8_t u8bit_1 = 150; uint8_t u8bit_2 = 15; test_equal(abs_diff(u8bit_1, u8bit_2), static_cast<uint8_t>(135)); @@ -26,15 +28,21 @@ void test_abs_diff() int16_t s16bit_1 = -1000; int16_t s16bit_2 = -100; test_equal(abs_diff(s16bit_1, s16bit_2), static_cast<int16_t>(900)); + + testcase_end(); } void test_find_max_amount() { + testcase_begin(__func__); + std::array<uint8_t, 10> array_1{4, 17, 193, 4, 193, 10, 5, 3, 4, 0}; test_equal(find_max_amount(array_1), static_cast<uint8_t>(4)); std::array<uint16_t, 5> array_2{1600, 300, 1600, 300, 1600}; test_equal(find_max_amount(array_2), static_cast<uint16_t>(1600)); + + testcase_end(); } void start()