aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-11-21 03:04:18 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-12-01 10:41:54 +0000
commit40f51a63c8e7258db15269427ae4fe1ad199c550 (patch)
tree353253a41863966995a45556731e7181a643c003 /tests/framework
parent327800401c4185d98fcc01b9c9efbc038a4228ed (diff)
downloadComputeLibrary-40f51a63c8e7258db15269427ae4fe1ad199c550.tar.gz
Update default C++ standard to C++14
(3RDPARTY_UPDATE) Resolves: COMPMID-3849 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I6369f112337310140e2d6c8e79630cd11138dfa0 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4544 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/Framework.cpp4
-rw-r--r--tests/framework/Framework.h2
-rw-r--r--tests/framework/TestCaseFactory.h5
-rw-r--r--tests/framework/command_line/CommonOptions.cpp12
-rw-r--r--tests/framework/instruments/Instrument.h4
-rw-r--r--tests/framework/instruments/SchedulerTimer.cpp2
6 files changed, 13 insertions, 16 deletions
diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp
index 8e836ee41f..a1c684c08a 100644
--- a/tests/framework/Framework.cpp
+++ b/tests/framework/Framework.cpp
@@ -24,7 +24,6 @@
#include "Framework.h"
#include "arm_compute/runtime/Scheduler.h"
-#include "support/MemorySupport.h"
#include "tests/framework/ParametersLibrary.h"
#include "tests/framework/TestFilter.h"
@@ -36,6 +35,7 @@
#include <chrono>
#include <iostream>
+#include <memory>
#include <sstream>
#include <type_traits>
@@ -94,7 +94,7 @@ Framework::Framework()
Instrument::make_instrument<OpenCLMemoryUsage, ScaleFactor::SCALE_1M>);
#endif /* ARM_COMPUTE_CL */
- instruments_info = support::cpp14::make_unique<InstrumentsInfo>();
+ instruments_info = std::make_unique<InstrumentsInfo>();
}
std::set<InstrumentsDescription> Framework::available_instruments() const
diff --git a/tests/framework/Framework.h b/tests/framework/Framework.h
index 01ab37347e..cf854f2351 100644
--- a/tests/framework/Framework.h
+++ b/tests/framework/Framework.h
@@ -355,7 +355,7 @@ private:
template <typename T>
inline void Framework::add_test_case(std::string test_name, DatasetMode mode, TestCaseFactory::Status status)
{
- _test_factories.emplace_back(support::cpp14::make_unique<SimpleTestCaseFactory<T>>(current_suite_name(), std::move(test_name), mode, status));
+ _test_factories.emplace_back(std::make_unique<SimpleTestCaseFactory<T>>(current_suite_name(), std::move(test_name), mode, status));
}
template <typename T, typename D>
diff --git a/tests/framework/TestCaseFactory.h b/tests/framework/TestCaseFactory.h
index 97ba230743..a41226af24 100644
--- a/tests/framework/TestCaseFactory.h
+++ b/tests/framework/TestCaseFactory.h
@@ -26,7 +26,6 @@
#include "DatasetModes.h"
#include "TestCase.h"
-#include "support/MemorySupport.h"
#include <memory>
#include <string>
@@ -183,7 +182,7 @@ inline ::std::ostream &operator<<(::std::ostream &stream, TestCaseFactory::Statu
template <typename T>
inline std::unique_ptr<TestCase> SimpleTestCaseFactory<T>::make() const
{
- return support::cpp14::make_unique<T>();
+ return std::make_unique<T>();
}
template <typename T, typename D>
@@ -195,7 +194,7 @@ inline DataTestCaseFactory<T, D>::DataTestCaseFactory(std::string suite_name, st
template <typename T, typename D>
inline std::unique_ptr<TestCase> DataTestCaseFactory<T, D>::make() const
{
- return support::cpp14::make_unique<T>(_data);
+ return std::make_unique<T>(_data);
}
} // namespace framework
} // namespace test
diff --git a/tests/framework/command_line/CommonOptions.cpp b/tests/framework/command_line/CommonOptions.cpp
index b4bf58bfdc..6fb37470c1 100644
--- a/tests/framework/command_line/CommonOptions.cpp
+++ b/tests/framework/command_line/CommonOptions.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Arm Limited.
+ * Copyright (c) 2018-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -101,7 +101,7 @@ std::vector<std::unique_ptr<Printer>> CommonOptions::create_printers()
if(pretty_console->value() && (log_file->is_set() || log_format->value() != LogFormat::PRETTY))
{
- auto pretty_printer = support::cpp14::make_unique<PrettyPrinter>();
+ auto pretty_printer = std::make_unique<PrettyPrinter>();
pretty_printer->set_color_output(color_output->value());
printers.push_back(std::move(pretty_printer));
}
@@ -110,13 +110,13 @@ std::vector<std::unique_ptr<Printer>> CommonOptions::create_printers()
switch(log_format->value())
{
case LogFormat::JSON:
- printer = support::cpp14::make_unique<JSONPrinter>();
+ printer = std::make_unique<JSONPrinter>();
break;
case LogFormat::NONE:
break;
case LogFormat::PRETTY:
default:
- auto pretty_printer = support::cpp14::make_unique<PrettyPrinter>();
+ auto pretty_printer = std::make_unique<PrettyPrinter>();
// Don't use colours if we print to a file:
pretty_printer->set_color_output((!log_file->is_set()) && color_output->value());
printer = std::move(pretty_printer);
@@ -139,14 +139,14 @@ std::vector<std::unique_ptr<Printer>> CommonOptions::create_printers()
if(json_file->is_set())
{
- printers.push_back(support::cpp14::make_unique<JSONPrinter>());
+ printers.push_back(std::make_unique<JSONPrinter>());
log_streams.push_back(std::make_shared<std::ofstream>(json_file->value()));
printers.back()->set_stream(*log_streams.back().get());
}
if(pretty_file->is_set())
{
- printers.push_back(support::cpp14::make_unique<PrettyPrinter>());
+ printers.push_back(std::make_unique<PrettyPrinter>());
log_streams.push_back(std::make_shared<std::ofstream>(pretty_file->value()));
printers.back()->set_stream(*log_streams.back().get());
}
diff --git a/tests/framework/instruments/Instrument.h b/tests/framework/instruments/Instrument.h
index 4506460515..3ea15825ad 100644
--- a/tests/framework/instruments/Instrument.h
+++ b/tests/framework/instruments/Instrument.h
@@ -24,8 +24,6 @@
#ifndef ARM_COMPUTE_TEST_INSTRUMENT
#define ARM_COMPUTE_TEST_INSTRUMENT
-#include "support/MemorySupport.h"
-
#include "../Utils.h"
#include "Measurement.h"
@@ -135,7 +133,7 @@ protected:
template <typename T, ScaleFactor scale>
inline std::unique_ptr<Instrument> Instrument::make_instrument()
{
- return support::cpp14::make_unique<T>(scale);
+ return std::make_unique<T>(scale);
}
} // namespace framework
diff --git a/tests/framework/instruments/SchedulerTimer.cpp b/tests/framework/instruments/SchedulerTimer.cpp
index b4d1c597e7..c81b807c3e 100644
--- a/tests/framework/instruments/SchedulerTimer.cpp
+++ b/tests/framework/instruments/SchedulerTimer.cpp
@@ -188,7 +188,7 @@ void SchedulerClock<output_timestamps>::test_start()
{
if(user != nullptr && user->scheduler() != nullptr)
{
- user->intercept_scheduler(support::cpp14::make_unique<Interceptor<output_timestamps>>(_kernels, *user->scheduler(), _scale_factor));
+ user->intercept_scheduler(std::make_unique<Interceptor<output_timestamps>>(_kernels, *user->scheduler(), _scale_factor));
}
});
}