MLECO-4490: Upgrade MLEK Catch Unit tests
*Removed default behaviour of unit-test executables to redirect output
to file.
*Accompanying change made to CI script to generate xml files there instead.
*Switched to newer minor version of Catch.
*Note: Support for simultaneous output to console and file is available in new major version (Catch 3).
Other unit test cleanup:
* Redundant warnings about common tests output removed
* Static cast added to silence compiler warning
* Removed additional printing in RNNoiseModelTests
Signed-off-by: Liam Barry <liam.barry@arm.com>
Change-Id: If9d7f366ec205a7cd49a45198a15867ef7b75afd
diff --git a/tests/common/ClassifierTests.cc b/tests/common/ClassifierTests.cc
index 7df4242..b15ffd4 100644
--- a/tests/common/ClassifierTests.cc
+++ b/tests/common/ClassifierTests.cc
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright 2021, 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2021,2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,7 +18,6 @@
#include <catch.hpp>
-
template<typename T>
void test_classifier_result(std::vector<std::pair<uint32_t, T>>& selectedResults, T defaultTensorValue) {
int dimArray[] = {1, 1001};
@@ -47,15 +46,10 @@
{
SECTION("Test invalid classifier")
{
- /* Note: Errors or warnings generated by this test will appear in output of any subsequent
- * failing tests causing misleading output. Give warning until solution is found */
- printf("Invalid classifier common test output:\n");
TfLiteTensor* outputTens = nullptr;
std::vector <arm::app::ClassificationResult> resultVec;
arm::app::Classifier classifier;
REQUIRE(!classifier.GetClassificationResults(outputTens, resultVec, {}, 5, true));
- printf("End of invalid classifier common test output. \nERROR messages above this line are "
- "expected and can be ignored.\n\n");
}
SECTION("Test classification results")