From 561eedf05cbe7767809d955c4b5f649adea57863 Mon Sep 17 00:00:00 2001 From: Aron Leibfried <aron.leibfried@kip.uni-heidelberg.de> Date: Tue, 13 Jul 2021 13:00:18 +0200 Subject: [PATCH] Add test names for bitformatting and helper test Change-Id: Id27a5ff2b03f7ec67d39e0acd12ed8b0802ed59c --- test/vx/test_bitformatting.cpp | 8 ++++++++ test/vx/test_helper.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/test/vx/test_bitformatting.cpp b/test/vx/test_bitformatting.cpp index 336a0b8..bb25520 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 5b3b985..542a61d 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() -- GitLab