aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/UNIT
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-06-29 14:51:57 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commitd0ae8b8ac8a371fd552c46d4b3be3db8628a5ade (patch)
treee4b035d01add61c37fcbeaf38a6a54e550235d8f /tests/validation/UNIT
parent5cb4c42cb5d781a44409ebc97a408e1379ce182d (diff)
downloadComputeLibrary-d0ae8b8ac8a371fd552c46d4b3be3db8628a5ade.tar.gz
COMPMID-417: Extract common toolchain support file
The support file is needed as Android toolchains are missing some C++11 functions. It further includes functions that have been introduced in C++14 but which we already need. Eventually the support file might become unnecessary if the Android compilers improve and we switch to C++14. Change-Id: Ib5ec506f1a17c78149c315ab2096b901b852c180 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79247 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'tests/validation/UNIT')
-rw-r--r--tests/validation/UNIT/FixedPoint.cpp5
-rw-r--r--tests/validation/UNIT/Utils.cpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/validation/UNIT/FixedPoint.cpp b/tests/validation/UNIT/FixedPoint.cpp
index 8042bb6da8..9206863ec6 100644
--- a/tests/validation/UNIT/FixedPoint.cpp
+++ b/tests/validation/UNIT/FixedPoint.cpp
@@ -25,6 +25,7 @@
#include "TypePrinter.h"
#include "Utils.h"
+#include "support/ToolchainSupport.h"
#include "validation/Validation.h"
#include "validation/ValidationUserConfiguration.h"
@@ -52,7 +53,7 @@ BOOST_AUTO_TEST_SUITE(FixedPoint)
BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
BOOST_DATA_TEST_CASE(FixedPointQS8Inputs, boost::unit_test::data::make(func_names) * boost::unit_test::data::xrange(1, 7), func_name, frac_bits)
{
- const std::string base_file_name = user_config.path.get() + "/dumps/" + func_name + "_Q8." + cpp11::to_string(frac_bits);
+ const std::string base_file_name = user_config.path.get() + "/dumps/" + func_name + "_Q8." + support::cpp11::to_string(frac_bits);
std::ifstream inputs_file{ base_file_name + ".in", std::ios::binary | std::ios::in };
BOOST_TEST_INFO(base_file_name + ".in");
@@ -84,7 +85,7 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l
BOOST_DATA_TEST_CASE(FixedPointQS8Outputs, (boost::unit_test::data::make(func_names) * boost::unit_test::data::xrange(1, 7)) ^ (boost::unit_test::data::make({ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 32, 67 })),
func_name, frac_bits, expected_failures)
{
- const std::string base_file_name = user_config.path.get() + "/dumps/" + func_name + "_Q8." + cpp11::to_string(frac_bits);
+ const std::string base_file_name = user_config.path.get() + "/dumps/" + func_name + "_Q8." + support::cpp11::to_string(frac_bits);
std::ifstream inputs_file{ base_file_name + ".in", std::ios::binary | std::ios::in };
std::ifstream reference_file{ base_file_name + ".out", std::ios::binary | std::ios::in };
diff --git a/tests/validation/UNIT/Utils.cpp b/tests/validation/UNIT/Utils.cpp
index 7a09be52b5..69523a5620 100644
--- a/tests/validation/UNIT/Utils.cpp
+++ b/tests/validation/UNIT/Utils.cpp
@@ -32,7 +32,6 @@
using namespace arm_compute;
using namespace arm_compute::test;
-using namespace arm_compute::test::cpp11;
using namespace arm_compute::test::validation;
#ifndef DOXYGEN_SKIP_THIS
@@ -43,14 +42,14 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l
BOOST_DATA_TEST_CASE(RoundHalfUp, boost::unit_test::data::make({ 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }) ^ boost::unit_test::data::make({ 1.f, 1.f, 2.f, 3.f, 3.f, -3.f, -3.f, -4.f, -4.f, -4.f }),
value, result)
{
- BOOST_TEST(cpp11::round_half_up(value) == result);
+ BOOST_TEST(round_half_up(value) == result);
}
BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
BOOST_DATA_TEST_CASE(RoundHalfEven, boost::unit_test::data::make({ 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }) ^ boost::unit_test::data::make({ 1.f, 1.f, 2.f, 2.f, 3.f, -3.f, -4.f, -4.f, -4.f, -4.f }),
value, result)
{
- BOOST_TEST(cpp11::round_half_even(value) == result);
+ BOOST_TEST(round_half_even(value) == result);
}
BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))