diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-07-17 13:50:12 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:42 +0100 |
commit | d03b00acd71847fa2db1c5308c87d3b57c781bf9 (patch) | |
tree | 7c58283ca1a067428ccafd0f310c8c0e89800306 /framework/Registrars.h | |
parent | ee493ae23b8cd6de5a6c578cea34bccb478d2f64 (diff) | |
download | ComputeLibrary-d03b00acd71847fa2db1c5308c87d3b57c781bf9.tar.gz |
COMPMID-415: Fix dataset modes
Change-Id: I266e8a22890c914edb3335104f073e79d2bf0ad9
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80766
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'framework/Registrars.h')
-rw-r--r-- | framework/Registrars.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/framework/Registrars.h b/framework/Registrars.h index 19064c07f5..ddbffabee4 100644 --- a/framework/Registrars.h +++ b/framework/Registrars.h @@ -24,6 +24,7 @@ #ifndef ARM_COMPUTE_TEST_FRAMEWORK_REGISTRARS #define ARM_COMPUTE_TEST_FRAMEWORK_REGISTRARS +#include "DatasetModes.h" #include "Framework.h" #include <string> @@ -45,16 +46,18 @@ public: /** Add a new test case with the given name to the framework. * * @param[in] test_name Name of the test case. + * @param[in] mode Mode in which the test should be activated. */ - TestCaseRegistrar(std::string test_name); + TestCaseRegistrar(std::string test_name, DatasetMode mode); /** Add a new data test case with the given name to the framework. * * @param[in] test_name Name of the test case. + * @param[in] mode Mode in which the test should be activated. * @param[in] dataset Dataset used as input for the test case. */ template <typename D> - TestCaseRegistrar(std::string test_name, D &&dataset); + TestCaseRegistrar(std::string test_name, DatasetMode mode, D &&dataset); }; /** Helper class to statically begin and end a test suite. */ @@ -72,14 +75,14 @@ public: }; template <typename T> -inline TestCaseRegistrar<T>::TestCaseRegistrar(std::string test_name) +inline TestCaseRegistrar<T>::TestCaseRegistrar(std::string test_name, DatasetMode mode) { - Framework::get().add_test_case<T>(std::move(test_name)); + Framework::get().add_test_case<T>(std::move(test_name), mode); } template <typename T> template <typename D> -inline TestCaseRegistrar<T>::TestCaseRegistrar(std::string test_name, D &&dataset) +inline TestCaseRegistrar<T>::TestCaseRegistrar(std::string test_name, DatasetMode mode, D &&dataset) { auto it = dataset.begin(); @@ -88,7 +91,7 @@ inline TestCaseRegistrar<T>::TestCaseRegistrar(std::string test_name, D &&datase // WORKAROUND for GCC 4.9 // The last argument should be *it to pass just the data and not the // iterator. - Framework::get().add_data_test_case<T>(test_name, it.description(), it); + Framework::get().add_data_test_case<T>(test_name, mode, it.description(), it); } } |