Skip to content
Snippets Groups Projects

ENH: Values can hold empty vector

Merged Daniel Hornung requested to merge f-empty-vector into dev
1 file
+ 8
0
Compare changes
  • Side-by-side
  • Inline
+ 8
0
@@ -136,6 +136,14 @@ TEST(test_value, test_list) {
@@ -136,6 +136,14 @@ TEST(test_value, test_list) {
EXPECT_EQ(item.IsString(), true);
EXPECT_EQ(item.IsString(), true);
EXPECT_EQ(item.GetAsString(), "id" + std::to_string(counter++));
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) {
TEST(test_value, test_scalar_value_to_value) {
Loading