diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-25 14:00:43 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-25 14:00:43 +0000 |
commit | e9c1e954efcc991ac9b0ada1be3d908b5cfa1905 (patch) | |
tree | e00cd378d073963ec01baf90db7ada5ef0df178b /eval | |
parent | 30fb5684d5e79d86e50a51beaa240fa5a2bcbff4 (diff) |
Add test for create_non_existing_attribute_value
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/tests/eval/typed_cells/typed_cells_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/eval/src/tests/eval/typed_cells/typed_cells_test.cpp b/eval/src/tests/eval/typed_cells/typed_cells_test.cpp index c49d3d886ed..53e0f7c84d3 100644 --- a/eval/src/tests/eval/typed_cells/typed_cells_test.cpp +++ b/eval/src/tests/eval/typed_cells/typed_cells_test.cpp @@ -593,4 +593,15 @@ TEST("require that self-updating cached function pointer 'sum' with return value EXPECT_NOT_EQUAL(op.self.my_fun, (&sum<double>)); } +TEST("require that non_existing_attribute_value can be controlled") { + float values[3] = {0,1,2}; + EXPECT_FALSE(TypedCells().non_existing_attribute_value()); + EXPECT_FALSE(TypedCells(values, CellType::FLOAT, 3).non_existing_attribute_value()); + EXPECT_FALSE(TypedCells(ConstArrayRef<double>()).non_existing_attribute_value()); + EXPECT_FALSE(TypedCells(ConstArrayRef<float>()).non_existing_attribute_value()); + EXPECT_FALSE(TypedCells(ConstArrayRef<Int8Float>()).non_existing_attribute_value()); + EXPECT_FALSE(TypedCells(ConstArrayRef<BFloat16>()).non_existing_attribute_value()); + EXPECT_TRUE(TypedCells::create_non_existing_attribute_value(values, CellType::FLOAT, 3).non_existing_attribute_value()); +} + TEST_MAIN() { TEST_RUN_ALL(); } |