Skip to content
Snippets Groups Projects
Verified Commit a1af0a28 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

TEST: Values from empty lists.

parent d1e6250c
Branches
Tags
2 merge requests!61Release 0.3.0,!50ENH: Values can hold empty vector
......@@ -136,6 +136,14 @@ TEST(test_value, test_list) {
EXPECT_EQ(item.IsString(), true);
EXPECT_EQ(item.GetAsString(), "id" + std::to_string(counter++));
}
// Test empty lists
auto empty_content = std::vector<int>();
Value value_0(empty_content);
EXPECT_TRUE(value_0.IsVector());
auto list_value_0 = value_0.GetAsVector();
EXPECT_EQ(list_value_0.size(), 0);
EXPECT_TRUE(list_value_0.empty());
}
TEST(test_value, test_scalar_value_to_value) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment