diff --git a/unittests/test_dom.cpp b/unittests/test_dom.cpp index 583bdec..6eaf8d8 100644 --- a/unittests/test_dom.cpp +++ b/unittests/test_dom.cpp @@ -123,13 +123,14 @@ TEST_F (Dom, Array2) { ASSERT_THAT (root, Optional (VariantWith (_))); auto const &arr = *std::get (*root); // Check the array contents. - std::byte const expected_bytes[] = { + std::array const expected_bytes = {{ std::byte{0xEF}, std::byte{0xBF}, std::byte{0xBD}, // REPLACEMENT CHARACTER std::byte{0x00} // NULL - }; - ASSERT_THAT (arr, ElementsAre (VariantWith (u8string{ - reinterpret_cast (expected_bytes)}))); + }}; + ASSERT_THAT (arr, + ElementsAre (VariantWith (u8string{ + reinterpret_cast (expected_bytes.data ())}))); // Check the parent pointers. EXPECT_EQ (root->parent, nullptr); EXPECT_THAT (arr, Each (Field ("parent", parent_field, Eq (&root.value ()))));