diff --git a/src/core/common/tests/utils/convert.hpp b/src/core/common/tests/utils/convert.hpp new file mode 100644 index 000000000..3ad129687 --- /dev/null +++ b/src/core/common/tests/utils/convert.hpp @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2025 EPAM Systems, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * This file provides helper functions for converting between standard library types + * and Aos types. + */ + +#ifndef AOS_CORE_COMMON_TESTS_UTILS_CONVERT_HPP_ +#define AOS_CORE_COMMON_TESTS_UTILS_CONVERT_HPP_ + +#include + +#include + +namespace aos::tests::utils { + +/** + * Converts Aos array to std::vector. + * + * @tparam T element type. + * @param src source array. + * @return std::vector. + */ +template +std::vector ToVector(const Array& src) +{ + return std::vector(src.begin(), src.end()); +} + +} // namespace aos::tests::utils + +#endif