// // Copyright © 2023-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "RedefineTestHelper.hpp" #include namespace armnnDelegate { void ExpandDimsSimpleTest() { // Set input data std::vector inputShape { 2, 2, 1 }; std::vector outputShape { 1, 2, 2, 1 }; std::vector axis { 0 }; std::vector inputValues = { 1, 2, 3, 4 }; std::vector expectedOutputValues = { 1, 2, 3, 4 }; RedefineTest(tflite::BuiltinOperator_EXPAND_DIMS, ::tflite::TensorType_FLOAT32, inputShape, outputShape, inputValues, expectedOutputValues, axis, true); } void ExpandDimsWithNegativeAxisTest() { // Set input data std::vector inputShape { 1, 2, 2 }; std::vector outputShape { 1, 2, 2, 1 }; std::vector axis { -1 }; std::vector inputValues = { 1, 2, 3, 4 }; std::vector expectedOutputValues = { 1, 2, 3, 4 }; RedefineTest(tflite::BuiltinOperator_EXPAND_DIMS, ::tflite::TensorType_FLOAT32, inputShape, outputShape, inputValues, expectedOutputValues, axis, true); } TEST_SUITE("ExpandDimsTests") { TEST_CASE ("ExpandDims_Simple_Test") { ExpandDimsSimpleTest(); } TEST_CASE ("ExpandDims_With_Negative_Axis_Test") { ExpandDimsWithNegativeAxisTest(); } } // TEST_SUITE("ExpandDimsTests") } // namespace armnnDelegate