Skip to content
Snippets Groups Projects
Commit 3211e05d authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add missing test for DataVariant

parent 53f57cb0
Branches
Tags
1 merge request!116Add tests for EmbeddedIDiscreteFunctionUtils
...@@ -11,11 +11,12 @@ TEST_CASE("DataVariant", "[language]") ...@@ -11,11 +11,12 @@ TEST_CASE("DataVariant", "[language]")
{ {
SECTION("AggregateDataVariant") 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") SECTION("size")
{ {
REQUIRE(aggregate.size() == 3); REQUIRE(aggregate.size() == 4);
} }
SECTION("output") SECTION("output")
...@@ -24,7 +25,8 @@ TEST_CASE("DataVariant", "[language]") ...@@ -24,7 +25,8 @@ TEST_CASE("DataVariant", "[language]")
aggregate_output << aggregate; aggregate_output << aggregate;
std::stringstream expected_output; 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()); REQUIRE(aggregate_output.str() == expected_output.str());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment