diff options
Diffstat (limited to 'tests/dataset')
-rw-r--r-- | tests/dataset/PoolingTypesDataset.h | 55 | ||||
-rw-r--r-- | tests/dataset/ShapeDatasets.h | 2 | ||||
-rw-r--r-- | tests/dataset/ThresholdDataset.h | 4 |
3 files changed, 58 insertions, 3 deletions
diff --git a/tests/dataset/PoolingTypesDataset.h b/tests/dataset/PoolingTypesDataset.h new file mode 100644 index 0000000000..c78a20b809 --- /dev/null +++ b/tests/dataset/PoolingTypesDataset.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2017 ARM Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifndef __ARM_COMPUTE_TEST_DATASET_POOLING_TYPE_DATASET_H__ +#define __ARM_COMPUTE_TEST_DATASET_POOLING_TYPE_DATASET_H__ + +#include "arm_compute/core/Types.h" +#include "dataset/GenericDataset.h" + +#ifdef BOOST +#include "boost_wrapper.h" +#endif + +namespace arm_compute +{ +namespace test +{ +/** Data set containing all possible pooling types. + * + * Can be used as input for Boost data test cases to automatically run a test + * case on all pooling types. + */ +class PoolingTypes final : public GenericDataset<PoolingType, 2> +{ +public: + PoolingTypes() + : GenericDataset{ PoolingType::MAX, PoolingType::AVG } + { + } + + ~PoolingTypes() = default; +}; +} // namespace test +} // namespace arm_compute +#endif //__ARM_COMPUTE_TEST_DATASET_POOLING_TYPE_DATASET_H__ diff --git a/tests/dataset/ShapeDatasets.h b/tests/dataset/ShapeDatasets.h index d2b82cae40..ecb478dbf0 100644 --- a/tests/dataset/ShapeDatasets.h +++ b/tests/dataset/ShapeDatasets.h @@ -118,7 +118,7 @@ class SmallShapes final : public ShapeDataset<3> { public: SmallShapes() - : ShapeDataset(TensorShape(5U, 5U), + : ShapeDataset(TensorShape(7U, 7U), TensorShape(27U, 13U, 2U), TensorShape(128U, 64U, 1U, 3U)) { diff --git a/tests/dataset/ThresholdDataset.h b/tests/dataset/ThresholdDataset.h index 956cf3d54d..a2d76e3c48 100644 --- a/tests/dataset/ThresholdDataset.h +++ b/tests/dataset/ThresholdDataset.h @@ -58,8 +58,8 @@ public: std::stringstream ss; ss << "Threshold"; ss << "_threshold_value" << threshold; - ss << "_false_value" << false_value; - ss << "_true_value" << true_value; + ss << "_false_value" << std::boolalpha << false_value; + ss << "_true_value" << std::boolalpha << true_value; ss << "_type"; ss << ((type == ThresholdType::BINARY) ? "binary" : "range"); ss << "_upper" << upper; |