diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-09-24 12:09:41 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 6c6597c1e17c32c6ad861780eee454a7deecfb75 (patch) | |
tree | 5df015557262a83e5e84a5fa365544bb1aa66762 /tests/validation/Validation.cpp | |
parent | c26ecf8ca13205cab2ce43d9f971e1569808e5bc (diff) | |
download | ComputeLibrary-6c6597c1e17c32c6ad861780eee454a7deecfb75.tar.gz |
COMPMID-500: Move HarrisCorners to new validation
Change-Id: I4e21ad98d029e360010c5927f04b716527700a00
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88888
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation/Validation.cpp')
-rw-r--r-- | tests/validation/Validation.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/validation/Validation.cpp b/tests/validation/Validation.cpp index aa70e6e794..ebca1936e7 100644 --- a/tests/validation/Validation.cpp +++ b/tests/validation/Validation.cpp @@ -297,11 +297,24 @@ void validate(std::vector<unsigned int> classified_labels, std::vector<unsigned { ARM_COMPUTE_EXPECT_EQUAL(classified_labels.size(), expected_labels.size(), framework::LogLevel::ERRORS); - const int min_num = std::min(classified_labels.size(), expected_labels.size()); + int64_t num_mismatches = 0; + const int num_elements = std::min(classified_labels.size(), expected_labels.size()); + + for(int i = 0; i < num_elements; ++i) + { + if(classified_labels[i] != expected_labels[i]) + { + ++num_mismatches; + ARM_COMPUTE_EXPECT_EQUAL(classified_labels[i], expected_labels[i], framework::LogLevel::DEBUG); + } + } - for(int i = 0; i < min_num; ++i) + if(num_elements > 0) { - ARM_COMPUTE_EXPECT_EQUAL(classified_labels[i], expected_labels[i], framework::LogLevel::ERRORS); + const float percent_mismatches = static_cast<float>(num_mismatches) / num_elements * 100.f; + + ARM_COMPUTE_TEST_INFO(num_mismatches << " values (" << std::fixed << std::setprecision(2) << percent_mismatches << "%) mismatched"); + ARM_COMPUTE_EXPECT_EQUAL(num_mismatches, 0, framework::LogLevel::ERRORS); } } } // namespace validation |