1 #include <sdbusplus/utility/tuple_to_array.hpp> 2 #include <gtest/gtest.h> 3 4 TEST(TupleToArray, Test3Chars) 5 { 6 std::array<char, 3> a{'a', 'b', 'c'}; 7 auto t = std::make_tuple('a', 'b', 'c'); 8 9 ASSERT_EQ(a, sdbusplus::utility::tuple_to_array(std::move(t))); 10 } 11 12 TEST(TupleToArray, Test4Ints) 13 { 14 std::array<int, 4> b{1, 2, 3, 4}; 15 auto t2 = std::make_tuple(1, 2, 3, 4); 16 17 ASSERT_EQ(b, sdbusplus::utility::tuple_to_array(std::move(t2))); 18 } 19