Skip to content

Commit

Permalink
tests: Add a log info print test
Browse files Browse the repository at this point in the history
Potentially, we want to be more verbose. This is a first effort to
improve in this area.

Signed-off-by: Johannes Demel <[email protected]>
  • Loading branch information
jdemel committed Aug 19, 2024
1 parent 2f6eb4c commit 6211752
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/googletest
Submodule googletest added at 9a32ae
11 changes: 10 additions & 1 deletion tests/test_volk_32fc_x2_multiply_32fc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class volk_32fc_x2_multiply_32fc_test : public VolkTest
{
volk_32fc_x2_multiply_32fc_manual(
result.data(), vec0.data(), vec1.data(), vector_length, impl_name.c_str());
EXPECT_TRUE(AreComplexFloatingPointArraysAlmostEqual(expected, result));
}

void execute_unaligned(const std::string impl_name)
Expand Down Expand Up @@ -91,6 +92,9 @@ TEST_P(volk_32fc_x2_multiply_32fc_test, aligned)
TEST_P(volk_32fc_x2_multiply_32fc_test, unaligned)
{
for (auto name : unaligned_impl_names) {
RecordProperty("aligned", false);
RecordProperty("implementation", name);
RecordProperty("size", vector_length);
fmt::print(
"test unaligned implementation: {:>12}, size={} ...", name, vector_length);
auto start = std::chrono::steady_clock::now();
Expand All @@ -106,4 +110,9 @@ TEST_P(volk_32fc_x2_multiply_32fc_test, unaligned)

INSTANTIATE_TEST_SUITE_P(volk_32fc_x2_multiply_32fc,
volk_32fc_x2_multiply_32fc_test,
testing::Values(7, 32, 128, 1023, 131071));
testing::Values(7, 32, 128, 1023, 131071),
testing::PrintToStringParamName()
// [](const testing::TestParamInfo<int>& info) {
// return fmt::format("{}", info.param);
// }
);
1 change: 1 addition & 0 deletions tests/volk_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <gtest/gtest.h>
#include <volk/volk.h>
#include <tuple>
#include <algorithm>


template <class T>
Expand Down

0 comments on commit 6211752

Please sign in to comment.