aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2023-04-10 23:26:40 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2023-04-26 14:02:18 +0000
commit357add2c4685362afb188feaaa67b90e4d6d2361 (patch)
tree8016797bb16f9a6e2334c2f30eb1fecf8913c3f0 /tests
parent2b04ec3b94da152281fbbc69f8539378589b1f56 (diff)
downloadarmnn-357add2c4685362afb188feaaa67b90e4d6d2361.tar.gz
Update cxxopts from 3.0 to 3.1.1
!android-nn-driver:9431 Signed-off-by: Jim Flynn <jim.flynn@arm.com> Change-Id: I58143445b5c5cf2aafd0838156c9543adce21e6a
Diffstat (limited to 'tests')
-rw-r--r--tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp7
-rw-r--r--tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp6
-rw-r--r--tests/ImageTensorGenerator/ImageTensorGenerator.cpp4
-rw-r--r--tests/InferenceTest.cpp4
-rw-r--r--tests/InferenceTest.hpp6
-rw-r--r--tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp6
-rw-r--r--tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp4
-rw-r--r--tests/TfLiteMobilenetQuantized-Armnn/TfLiteMobilenetQuantized-Armnn.cpp4
-rw-r--r--tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp11
-rw-r--r--tests/profiling/gatordmock/CommandLineProcessor.cpp6
10 files changed, 29 insertions, 29 deletions
diff --git a/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp b/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp
index 007f81890e..3a54b1ab19 100644
--- a/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp
@@ -34,7 +34,7 @@ void CheckOptionDependency(const cxxopts::ParseResult& result,
// Check that the given options are valid.
if (option == nullptr || required == nullptr)
{
- throw cxxopts::OptionParseException("Invalid option to check dependency for");
+ throw cxxopts::exceptions::exception("Invalid option to check dependency for");
}
// Check that if 'option' is provided, 'required' is also provided.
@@ -42,7 +42,7 @@ void CheckOptionDependency(const cxxopts::ParseResult& result,
{
if (CheckOption(result, required) == 0 || result[required].has_default())
{
- throw cxxopts::OptionParseException(
+ throw cxxopts::exceptions::exception(
std::string("Option '") + option + "' requires option '" + required + "'.");
}
}
@@ -514,7 +514,7 @@ void ProgramOptions::ParseOptions(int ac, const char* av[])
m_ExNetParams.m_OutputDetailsOnlyToStdOut) &&
!m_ExNetParams.m_EnableProfiling)
{
- throw cxxopts::OptionParseException("You must enable profiling if you would like to output layer details");
+ throw cxxopts::exceptions::exception("You must enable profiling if you would like to output layer details");
}
// Some options can't be assigned directly because they need some post-processing:
@@ -617,4 +617,3 @@ void ProgramOptions::ParseOptions(int ac, const char* av[])
m_ExNetParams.m_ComparisonComputeDevices = GetBackendIDs(comparisonComputDevices);
}
}
-
diff --git a/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp b/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp
index a949da33a8..46aad43976 100644
--- a/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp
+++ b/tests/ImageCSVFileGenerator/ImageCSVFileGenerator.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -167,7 +167,7 @@ public:
return false;
}
}
- catch (const cxxopts::OptionException& e)
+ catch (const cxxopts::exceptions::exception& e)
{
std::cerr << e.what() << std::endl << std::endl;
return false;
@@ -249,4 +249,4 @@ int main(int argc, char* argv[])
}
return 0;
-} \ No newline at end of file
+}
diff --git a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
index d4a2103396..6e5b8ca0d9 100644
--- a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
+++ b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -205,7 +205,7 @@ public:
return false;
}
}
- catch (const cxxopts::OptionException& e)
+ catch (const cxxopts::exceptions::exception& e)
{
std::cerr << e.what() << std::endl << std::endl;
return false;
diff --git a/tests/InferenceTest.cpp b/tests/InferenceTest.cpp
index 01b8983d23..9949e068c4 100644
--- a/tests/InferenceTest.cpp
+++ b/tests/InferenceTest.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "InferenceTest.hpp"
@@ -61,7 +61,7 @@ bool ParseCommandLine(int argc, char** argv, IInferenceTestCaseProvider& testCas
CheckRequiredOptions(result, required);
}
- catch (const cxxopts::OptionException& e)
+ catch (const cxxopts::exceptions::exception& e)
{
std::cerr << e.what() << std::endl << options.help() << std::endl;
return false;
diff --git a/tests/InferenceTest.hpp b/tests/InferenceTest.hpp
index fb9c048488..f8a7d5e61e 100644
--- a/tests/InferenceTest.hpp
+++ b/tests/InferenceTest.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
@@ -28,7 +28,7 @@ inline std::istream& operator>>(std::istream& in, armnn::Compute& compute)
if (compute == armnn::Compute::Undefined)
{
in.setstate(std::ios_base::failbit);
- throw cxxopts::OptionException(fmt::format("Unrecognised compute device: {}", token));
+ throw cxxopts::exceptions::exception(fmt::format("Unrecognised compute device: {}", token));
}
return in;
}
@@ -41,7 +41,7 @@ inline std::istream& operator>>(std::istream& in, armnn::BackendId& backend)
if (compute == armnn::Compute::Undefined)
{
in.setstate(std::ios_base::failbit);
- throw cxxopts::OptionException(fmt::format("Unrecognised compute device: {}", token));
+ throw cxxopts::exceptions::exception(fmt::format("Unrecognised compute device: {}", token));
}
backend = compute;
return in;
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
index 9e5507b9c2..b2fd5cb799 100644
--- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
+++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -131,7 +131,7 @@ int main(int argc, char* argv[])
}
}
}
- catch (const cxxopts::OptionException& e)
+ catch (const cxxopts::exceptions::exception& e)
{
std::cerr << e.what() << std::endl << std::endl;
return EXIT_FAILURE;
@@ -498,4 +498,4 @@ std::vector<armnnUtils::LabelCategoryNames> LoadModelOutputLabels(const std::str
modelOutputLabels.push_back(predictionCategoryNames);
}
return modelOutputLabels;
-} \ No newline at end of file
+}
diff --git a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
index 133b8d885f..823cbbc50a 100644
--- a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
+++ b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -83,7 +83,7 @@ int main(int argc, char* argv[])
}
}
}
- catch (const cxxopts::OptionException& e)
+ catch (const cxxopts::exceptions::exception& e)
{
std::cerr << e.what() << std::endl << in_options.help() << std::endl;
return EXIT_FAILURE;
diff --git a/tests/TfLiteMobilenetQuantized-Armnn/TfLiteMobilenetQuantized-Armnn.cpp b/tests/TfLiteMobilenetQuantized-Armnn/TfLiteMobilenetQuantized-Armnn.cpp
index 56b145d6ee..e554111a46 100644
--- a/tests/TfLiteMobilenetQuantized-Armnn/TfLiteMobilenetQuantized-Armnn.cpp
+++ b/tests/TfLiteMobilenetQuantized-Armnn/TfLiteMobilenetQuantized-Armnn.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "../InferenceTest.hpp"
@@ -76,7 +76,7 @@ std::string GetLabelsFilenameFromOptions(int argc, char* argv[])
auto result = options.parse(argc, argv);
}
- catch (const cxxopts::OptionException& e)
+ catch (const cxxopts::exceptions::exception& e)
{
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
diff --git a/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp b/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp
index 3ecd160b48..355fa25ad3 100644
--- a/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp
+++ b/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020 Arm Ltd. All rights reserved.
+// Copyright © 2020, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -417,7 +417,7 @@ struct ParseArgs
{
std::stringstream ss;
ss << "Argument given to" << argName << "is not a valid file path";
- throw cxxopts::option_syntax_exception(ss.str().c_str());
+ throw cxxopts::exceptions::invalid_option_syntax(ss.str().c_str());
}
return path;
}
@@ -428,7 +428,7 @@ struct ParseArgs
return "";
}
- throw cxxopts::missing_argument_exception(argName);
+ throw cxxopts::exceptions::missing_argument(argName);
}
}
@@ -440,7 +440,7 @@ struct ParseArgs
{
return std::vector<std::string>();
}
- throw cxxopts::option_syntax_exception("Comparison files requires 5 file paths.");
+ throw cxxopts::exceptions::invalid_option_syntax("Comparison files requires 5 file paths.");
}
std::vector<std::string> filePaths;
@@ -449,7 +449,8 @@ struct ParseArgs
filePaths.push_back(path);
if (!ValidateFilePath(filePaths.back(), ExpectFile::True))
{
- throw cxxopts::option_syntax_exception("Argument given to Comparison Files is not a valid file path");
+ throw cxxopts::exceptions::invalid_option_syntax(
+ "Argument given to Comparison Files is not a valid file path");
}
}
return filePaths;
diff --git a/tests/profiling/gatordmock/CommandLineProcessor.cpp b/tests/profiling/gatordmock/CommandLineProcessor.cpp
index c1b6a6b2b3..a532401cc6 100644
--- a/tests/profiling/gatordmock/CommandLineProcessor.cpp
+++ b/tests/profiling/gatordmock/CommandLineProcessor.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2019, 2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -63,7 +63,7 @@ bool CommandLineProcessor::ProcessCommandLine(int argc, char *argv[])
m_Echo = true;
}
}
- catch (const cxxopts::OptionException& e)
+ catch (const cxxopts::exceptions::exception& e)
{
std::cerr << e.what() << std::endl;
return false;
@@ -74,4 +74,4 @@ bool CommandLineProcessor::ProcessCommandLine(int argc, char *argv[])
} // namespace gatordmock
-} // namespace armnn \ No newline at end of file
+} // namespace armnn