diff options
author | David Beck <david.beck@arm.com> | 2018-10-11 15:47:00 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-22 16:57:53 +0100 |
commit | f1153cd864805ad2ed1197a9667e333dc38b8873 (patch) | |
tree | 74295f5361eeae4116de7fd129e5c72631f6f943 /src/armnn/test/OptionalTest.cpp | |
parent | 4423ac7fb7ec96c5fe88df2dd6de417c7d8b3709 (diff) | |
download | armnn-f1153cd864805ad2ed1197a9667e333dc38b8873.tar.gz |
IVGCVSW-1969 : remove boost::optional compatibility from ArmNN Optional
* because it was added by mistake, assuming it was released in 18.08
which is not the case
Change-Id: I9c288eba56f3f6192007f79db884b255a14456e4
Diffstat (limited to 'src/armnn/test/OptionalTest.cpp')
-rw-r--r-- | src/armnn/test/OptionalTest.cpp | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/armnn/test/OptionalTest.cpp b/src/armnn/test/OptionalTest.cpp index a869c7e191..3f4c02d56f 100644 --- a/src/armnn/test/OptionalTest.cpp +++ b/src/armnn/test/OptionalTest.cpp @@ -5,7 +5,6 @@ #include <boost/test/unit_test.hpp> #include <armnn/Optional.hpp> -#include <boost/optional.hpp> #include <string> namespace @@ -19,19 +18,7 @@ void PassStringRefWithDefault(armnn::Optional<std::string&> value = armnn::Empty { } -void BoostCompatibilityTester(const armnn::Optional<std::string>& optionalString, - bool hasValue, - const std::string& expectedValue) -{ - BOOST_TEST(optionalString.has_value() == hasValue); - if (hasValue) - { - BOOST_TEST(optionalString.value() == expectedValue); - } -} - -} - +} // namespace <anonymous> BOOST_AUTO_TEST_SUITE(OptionalTests) @@ -105,28 +92,6 @@ BOOST_AUTO_TEST_CASE(StringRefTests) BOOST_TEST(optionalHelloRef3.value() == "Long Other String"); } -BOOST_AUTO_TEST_CASE(BoostCompatibilityTests) -{ - // sanity checks - BoostCompatibilityTester(armnn::Optional<std::string>(), false, ""); - BoostCompatibilityTester(armnn::Optional<std::string>("Hello World"), true, "Hello World"); - - // verify boost signature selector - BOOST_TEST(armnn::CheckBoostOptionalSignature<boost::optional<std::string>>::Result() == true); - BOOST_TEST(armnn::CheckBoostOptionalSignature<armnn::Optional<std::string>>::Result() == false); - - // the real thing is to see that we can pass a boost::optional in place - // of an ArmNN Optional - boost::optional<std::string> empty; - boost::optional<std::string> helloWorld("Hello World"); - - BoostCompatibilityTester(empty, false, ""); - BoostCompatibilityTester(helloWorld, true, "Hello World"); - - BoostCompatibilityTester(boost::optional<std::string>(), false, ""); - BoostCompatibilityTester(boost::optional<std::string>("Hello World"), true, "Hello World"); -} - BOOST_AUTO_TEST_CASE(SimpleIntTests) { const int intValue = 123; |