diff options
Diffstat (limited to 'tests/common')
-rw-r--r-- | tests/common/ClassifierTests.cc | 8 | ||||
-rw-r--r-- | tests/common/ProfilerTests.cc | 7 | ||||
-rw-r--r-- | tests/common/SlidingWindowTests.cc | 6 |
3 files changed, 6 insertions, 15 deletions
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 @@ TEST_CASE("Common classifier") { 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") diff --git a/tests/common/ProfilerTests.cc b/tests/common/ProfilerTests.cc index 0b487e5..0af8d65 100644 --- a/tests/common/ProfilerTests.cc +++ b/tests/common/ProfilerTests.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"); @@ -44,14 +44,11 @@ TEST_CASE("Common: Test Profiler") /* Improper usage should cause failure. * 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 profiler usage common test output:\n"); + * failing tests causing misleading output unless logging is disabled.*/ REQUIRE(false == profilerValid.StopProfiling()); /* We need to start it first */ REQUIRE(true == profilerValid.StartProfiling()); /* Should be able to start it fine */ REQUIRE(false == profilerValid.StartProfiling()); /* Can't restart it without resetting */ - printf("End of Invalid profiler usage common test output. \nERROR messages above this line " - "are expected and can be ignored.\n\n"); profilerValid.Reset(); REQUIRE(true == profilerValid.StartProfiling()); /* Can start it again now.. */ REQUIRE(true == profilerValid.StopProfiling()); diff --git a/tests/common/SlidingWindowTests.cc b/tests/common/SlidingWindowTests.cc index 33fe65e..b856e16 100644 --- a/tests/common/SlidingWindowTests.cc +++ b/tests/common/SlidingWindowTests.cc @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright 2021 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"); @@ -175,12 +175,12 @@ TEST_CASE("Common: Slide Index") REQUIRE(slider.Index() == 0); for (int i = 0; i < 5; i++) { slider.Next(); - REQUIRE(slider.Index() == i); + REQUIRE(static_cast<int>(slider.Index()) == i); } } -TEST_CASE("Common: Total strides") +TEST_CASE("Common: Total strides") { std::vector<int> test{1, 2, 3, 4, 5}; |