diff options
author | Liam Barry <liam.barry@arm.com> | 2023-11-03 15:49:34 +0000 |
---|---|---|
committer | Liam Barry <liam.barry@arm.com> | 2023-11-20 15:24:42 +0000 |
commit | cca34a93798c52bffd41b07ead3595f398005e14 (patch) | |
tree | 052cd8ceb1faa7d1b6e35bdf6b735c5f3a81a040 /tests/use_case/noise_reduction/RNNoiseModelTests.cc | |
parent | 4865c4fc171d6b0eb6e2b470f123ff81e45a34f8 (diff) | |
download | ml-embedded-evaluation-kit-cca34a93798c52bffd41b07ead3595f398005e14.tar.gz |
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
Diffstat (limited to 'tests/use_case/noise_reduction/RNNoiseModelTests.cc')
-rw-r--r-- | tests/use_case/noise_reduction/RNNoiseModelTests.cc | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/tests/use_case/noise_reduction/RNNoiseModelTests.cc b/tests/use_case/noise_reduction/RNNoiseModelTests.cc index 7262275..d08c5f3 100644 --- a/tests/use_case/noise_reduction/RNNoiseModelTests.cc +++ b/tests/use_case/noise_reduction/RNNoiseModelTests.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"); @@ -104,26 +104,6 @@ public: }; -template <class T> -void printArray(size_t dataSz, T data){ - char strhex[8]; - std::string strdump; - - for (size_t i = 0; i < dataSz; ++i) { - if (0 == i % 8) { - printf("%s\n\t", strdump.c_str()); - strdump.clear(); - } - snprintf(strhex, sizeof(strhex) - 1, - "0x%02x, ", data[i]); - strdump += std::string(strhex); - } - - if (!strdump.empty()) { - printf("%s\n", strdump.c_str()); - } -} - /* This is true for gcc x86 platform, not guaranteed for other compilers and platforms. */ TEST_CASE("Test initial GRU out state is 0", "[RNNoise]") { @@ -134,14 +114,10 @@ TEST_CASE("Test initial GRU out state is 0", "[RNNoise]") arm::app::rnn::GetModelLen()); auto map = model.GetStateMap(); - for(auto& mapping: map) { TfLiteTensor* gruOut = model.GetOutputTensor(mapping.first); auto* outGruState = tflite::GetTensorData<uint8_t>(gruOut); - printf("gru out state:"); - printArray(gruOut->bytes, outGruState); - for (size_t tIndex = 0; tIndex < gruOut->bytes; tIndex++) { REQUIRE(outGruState[tIndex] == 0); } |