From 3211e05db1644a68a15b31bc58ae21e4f2430a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Mon, 13 Sep 2021 10:33:31 +0200 Subject: [PATCH] Add missing test for DataVariant --- tests/test_DataVariant.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_DataVariant.cpp b/tests/test_DataVariant.cpp index 0db6af9b2..dab7d6436 100644 --- a/tests/test_DataVariant.cpp +++ b/tests/test_DataVariant.cpp @@ -11,11 +11,12 @@ TEST_CASE("DataVariant", "[language]") { SECTION("AggregateDataVariant") { - AggregateDataVariant aggregate{std::vector<DataVariant>{double{1.3}, int64_t{-3}, std::vector<double>{1, 2.7}}}; + AggregateDataVariant aggregate{ + std::vector<DataVariant>{double{1.3}, int64_t{-3}, std::vector<double>{1, 2.7}, bool{true}}}; SECTION("size") { - REQUIRE(aggregate.size() == 3); + REQUIRE(aggregate.size() == 4); } SECTION("output") @@ -24,7 +25,8 @@ TEST_CASE("DataVariant", "[language]") aggregate_output << aggregate; std::stringstream expected_output; - expected_output << '(' << double{1.3} << ", " << int64_t{-3} << ", (" << 1 << ", " << 2.7 << "))"; + expected_output << '(' << double{1.3} << ", " << int64_t{-3} << ", (" << 1 << ", " << 2.7 << "), " + << std::boolalpha << true << ")"; REQUIRE(aggregate_output.str() == expected_output.str()); } -- GitLab