From 49cec84ea856c40e3a3b1d2b99bac998df9b3718 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 29 Aug 2020 20:01:00 +0100 Subject: Actually assert the array contents --- libjsonpp/testParse.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libjsonpp/testParse.cpp b/libjsonpp/testParse.cpp index 714cad4..70e3abb 100644 --- a/libjsonpp/testParse.cpp +++ b/libjsonpp/testParse.cpp @@ -69,7 +69,10 @@ BOOST_AUTO_TEST_CASE(parse_array) BOOST_AUTO_TEST_CASE(parse_array_of_strings) { const Glib::ustring val(" [ \"en\", \"de\", \"ro\", \"es\", \"fa\" ] "); - std::get(json::parseValue(val)); + const auto arr = std::get(json::parseValue(val)); + BOOST_REQUIRE_EQUAL(arr.size(), 5); + BOOST_CHECK_EQUAL(std::get(arr.front()), "en"); + BOOST_CHECK_EQUAL(std::get(arr.back()), "fa"); } BOOST_AUTO_TEST_CASE(parse_null) -- cgit v1.2.3