From d9dc003084eeaae47e2d0f51d1bb396d2fe54480 Mon Sep 17 00:00:00 2001 From: Denes Tarjan Date: Fri, 5 Jul 2024 10:53:59 +0000 Subject: [PATCH 1/2] Add missing 'return true' to conformity tests --- conformity/opencv/test_exp.cpp | 1 + conformity/opencv/test_scale.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/conformity/opencv/test_exp.cpp b/conformity/opencv/test_exp.cpp index eb97c96ac..9aed0eb98 100644 --- a/conformity/opencv/test_exp.cpp +++ b/conformity/opencv/test_exp.cpp @@ -35,6 +35,7 @@ bool test_exp(int index, RecreatedMessageQueue& request_queue, // range is defined if (are_float_matrices_different(1.5, expected_mat, actual_mat)) { fail_print_matrices(x, y, input_mat, actual_mat, expected_mat); + return true; } } } diff --git a/conformity/opencv/test_scale.cpp b/conformity/opencv/test_scale.cpp index f669f1fa3..5948ffb18 100644 --- a/conformity/opencv/test_scale.cpp +++ b/conformity/opencv/test_scale.cpp @@ -38,6 +38,7 @@ bool test_scale(int index, RecreatedMessageQueue& request_queue, !are_matrices_different(0, actual_mat, expected_mat)); if (!success) { fail_print_matrices(x, y, input_mat, actual_mat, expected_mat); + return true; } } } @@ -50,15 +51,15 @@ std::vector& scale_tests_get() { // clang-format off static std::vector tests = { TEST("Scale float32, scale=1.0, shift=2.0", (test_scale<1000, 2000, CV_32FC4>), (exec_scale<1000, 2000>)), - TEST("Scale float32, scale=-10.0, shift=0.0", (test_scale<(-10000), 0, CV_32FC4>), (exec_scale<(-10000), 0>)), - TEST("Scale float32, scale=3.14, shift=2.72", (test_scale<3140, 2720, CV_32FC4>), (exec_scale<3140, 2720>)), - TEST("Scale float32, scale=7e5, shift=8e-3", (test_scale<700000000, 8, CV_32FC4>), (exec_scale<700000000, 8>)), + TEST("Scale float32, scale=-10.0, shift=0.0", (test_scale<(-10000), 0, CV_32FC1>), (exec_scale<(-10000), 0>)), + TEST("Scale float32, scale=3.14, shift=2.72", (test_scale<3140, 2720, CV_32FC2>), (exec_scale<3140, 2720>)), + TEST("Scale float32, scale=7e5, shift=8e-3", (test_scale<700000000, 8, CV_32FC3>), (exec_scale<700000000, 8>)), TEST("Scale float32, scale=1e-3, shift=8e-3", (test_scale<1, 8, CV_32FC4>), (exec_scale<1, 8>)), TEST("Scale uint8, scale=1.0, shift=2.0", (test_scale<1000, 2000, CV_8UC4>), (exec_scale<1000, 2000>)), - TEST("Scale uint8, scale=-10.0, shift=0.0", (test_scale<(-10000), 0, CV_8UC4>), (exec_scale<(-10000), 0>)), - TEST("Scale uint8, scale=3.14, shift=-2.72", (test_scale<3140, -2720, CV_8UC4>), (exec_scale<3140, -2720>)), - TEST("Scale uint8, scale=17.17, shift=3.9", (test_scale<17170, 3900, CV_8UC4>), (exec_scale<17170, 3900>)), + TEST("Scale uint8, scale=-10.0, shift=0.0", (test_scale<(-10000), 0, CV_8UC1>), (exec_scale<(-10000), 0>)), + TEST("Scale uint8, scale=3.14, shift=-2.72", (test_scale<3140, -2720, CV_8UC2>), (exec_scale<3140, -2720>)), + TEST("Scale uint8, scale=17.17, shift=3.9", (test_scale<17170, 3900, CV_8UC3>), (exec_scale<17170, 3900>)), TEST("Scale uint8, scale=0.13, shift=230", (test_scale<130, 230000, CV_8UC4>), (exec_scale<130, 230000>)), }; // clang-format on -- GitLab From 46709c44c7d1e82b584dac2a8b4173ac38d79500 Mon Sep 17 00:00:00 2001 From: Denes Tarjan Date: Fri, 5 Jul 2024 10:54:04 +0000 Subject: [PATCH 2/2] Fix typo Unigned -> Unsigned --- conformity/opencv/test_float_conv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conformity/opencv/test_float_conv.cpp b/conformity/opencv/test_float_conv.cpp index 13e8c8812..ae091b82a 100644 --- a/conformity/opencv/test_float_conv.cpp +++ b/conformity/opencv/test_float_conv.cpp @@ -202,7 +202,7 @@ std::vector& float_conversion_tests_get() { TEST("Unsigned Int8 to Float32, random, 4 channel", (test_int8_to_float32_random), exec_int8_to_float32), TEST("Signed Int8 to Float32, custom", test_int8_to_float32_custom, exec_int8_to_float32), - TEST("Unigned Int8 to Float32, custom", test_int8_to_float32_custom, exec_int8_to_float32), + TEST("Unsigned Int8 to Float32, custom", test_int8_to_float32_custom, exec_int8_to_float32), }; // clang-format on return tests; -- GitLab