diff options
author | Jacques Lucke <jacques@blender.org> | 2021-09-02 14:42:54 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-09-02 14:42:54 +0300 |
commit | 00ed599fe4af92e654586778e2c6d5251a1f5dc8 (patch) | |
tree | 48f2a9fc4d1cba4f61015c5aec5275f373e112ae /source/blender | |
parent | 769c7521b58193e9fbb3f4b11bdd33f59d4c0be3 (diff) |
fix test
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/functions/tests/FN_field_test.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/functions/tests/FN_field_test.cc b/source/blender/functions/tests/FN_field_test.cc index 0eb9e9e1351..67fda512c92 100644 --- a/source/blender/functions/tests/FN_field_test.cc +++ b/source/blender/functions/tests/FN_field_test.cc @@ -221,20 +221,20 @@ TEST(field, TwoFunctionsTwoOutputs) FieldContext field_context; FieldEvaluator field_evaluator{field_context, &mask}; - FieldOutputHandle<int> handle_1 = field_evaluator.add(result_field_1); - FieldOutputHandle<int> handle_2 = field_evaluator.add(result_field_2); + const VArray<int> *result_1 = nullptr; + const VArray<int> *result_2 = nullptr; + field_evaluator.add(result_field_1, &result_1); + field_evaluator.add(result_field_2, &result_2); field_evaluator.evaluate(); - const VArray<int> &result_1 = handle_1.get(); - const VArray<int> &result_2 = handle_2.get(); - EXPECT_EQ(result_1[2], 4); - EXPECT_EQ(result_1[4], 8); - EXPECT_EQ(result_1[6], 12); - EXPECT_EQ(result_1[8], 16); - EXPECT_EQ(result_2[2], 24); - EXPECT_EQ(result_2[4], 28); - EXPECT_EQ(result_2[6], 32); - EXPECT_EQ(result_2[8], 36); + EXPECT_EQ(result_1->get(2), 4); + EXPECT_EQ(result_1->get(4), 8); + EXPECT_EQ(result_1->get(6), 12); + EXPECT_EQ(result_1->get(8), 16); + EXPECT_EQ(result_2->get(2), 24); + EXPECT_EQ(result_2->get(4), 28); + EXPECT_EQ(result_2->get(6), 32); + EXPECT_EQ(result_2->get(8), 36); } } // namespace blender::fn::tests |