Line | Branch | Exec | Source |
---|---|---|---|
1 | // Copyright Contributors to the OpenVDB Project | ||
2 | // SPDX-License-Identifier: MPL-2.0 | ||
3 | |||
4 | #include "CompareGrids.h" | ||
5 | #include "TestHarness.h" | ||
6 | |||
7 | #include "../util.h" | ||
8 | |||
9 | #include <openvdb_ax/codegen/String.h> | ||
10 | #include <openvdb_ax/compiler/CustomData.h> | ||
11 | #include <openvdb_ax/Exceptions.h> | ||
12 | |||
13 | #include <cppunit/extensions/HelperMacros.h> | ||
14 | |||
15 | using namespace openvdb::points; | ||
16 | |||
17 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
|
1 | class TestExternals : public unittest_util::AXTestCase |
18 | { | ||
19 | public: | ||
20 | |||
21 |
3/6✓ Branch 1 taken 38 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 38 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 38 times.
✗ Branch 8 not taken.
|
114 | std::string dir() const override { return GET_TEST_DIRECTORY(); } |
22 | |||
23 |
3/6✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
|
4 | CPPUNIT_TEST_SUITE(TestExternals); |
24 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
|
6 | CPPUNIT_TEST(assignFrom); |
25 |
4/8✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
|
4 | CPPUNIT_TEST_SUITE_END(); |
26 | |||
27 | void assignFrom(); | ||
28 | }; | ||
29 | |||
30 | CPPUNIT_TEST_SUITE_REGISTRATION(TestExternals); | ||
31 | |||
32 | void | ||
33 | 1 | TestExternals::assignFrom() | |
34 | { | ||
35 | 1 | const std::string code = R"( | |
36 | _T1_@test1 = _T1_$ext1;)"; | ||
37 | |||
38 | 1 | auto generate = [&](const auto& types) { | |
39 |
2/2✓ Branch 0 taken 19 times.
✓ Branch 1 taken 1 times.
|
20 | for (const auto& type : types) { |
40 |
1/2✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
|
19 | std::string repl = code; |
41 |
2/4✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 19 times.
✗ Branch 5 not taken.
|
19 | unittest_util::replace(repl, "_T1_", type); |
42 |
3/6✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 19 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 19 times.
✗ Branch 8 not taken.
|
38 | this->registerTest(repl, "external_assign_from." + type + ".ax"); |
43 | } | ||
44 | 1 | }; | |
45 | |||
46 |
23/46✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 1 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 1 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 1 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 1 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 1 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 1 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 64 taken 19 times.
✓ Branch 65 taken 1 times.
✗ Branch 68 not taken.
✗ Branch 69 not taken.
|
20 | generate(std::vector<std::string>{ |
47 | "bool", "int32", "int64", "float", "double", | ||
48 | "vec2i", "vec2f", "vec2d", | ||
49 | "vec3i", "vec3f", "vec3d", | ||
50 | "vec4i", "vec4f", "vec4d", | ||
51 | "mat3f", "mat3d", | ||
52 | "mat4f", "mat4d", | ||
53 | "string" | ||
54 | }); | ||
55 | |||
56 | const std::map<std::string, std::function<void()>> expected = { | ||
57 | { "bool", | ||
58 | 1 | [&](){ | |
59 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | mHarness.addAttribute<bool>("test1", true); |
60 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
61 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<bool>(true).copy()); |
62 | 1 | }, | |
63 | }, | ||
64 | { "int32", | ||
65 | 1 | [&](){ | |
66 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | mHarness.addAttribute<int32_t>("test1", -2); |
67 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
68 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<int32_t>(-2).copy()); |
69 | 1 | }, | |
70 | }, | ||
71 | { "int64", | ||
72 | 1 | [&](){ | |
73 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | mHarness.addAttribute<int64_t>("test1", 3); |
74 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
75 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<int64_t>(3).copy()); |
76 | 1 | }, | |
77 | }, | ||
78 | { "float", | ||
79 | 1 | [&](){ | |
80 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | mHarness.addAttribute<float>("test1", 4.5f); |
81 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
82 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<float>(4.5f).copy()); |
83 | 1 | }, | |
84 | }, | ||
85 | { "double", | ||
86 | 1 | [&](){ | |
87 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | mHarness.addAttribute<double>("test1", -3); |
88 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
89 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<double>(-3).copy()); |
90 | 1 | }, | |
91 | }, | ||
92 | { "vec2i", | ||
93 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
94 | const openvdb::math::Vec2<int32_t> value(5,-6); | ||
95 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec2<int32_t>>("test1", value); |
96 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
97 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec2<int32_t>>(value).copy()); |
98 | 1 | }, | |
99 | }, | ||
100 | { "vec2f", | ||
101 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
102 | const openvdb::math::Vec2<float> value(2.3f,-7.8f); | ||
103 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec2<float>>("test1", value); |
104 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
105 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec2<float>>(value).copy()); |
106 | 1 | }, | |
107 | }, | ||
108 | { "vec2d", | ||
109 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
110 | const openvdb::math::Vec2<double> value(-1.3,9.8); | ||
111 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec2<double>>("test1", value); |
112 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
113 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec2<double>>(value).copy()); |
114 | 1 | }, | |
115 | }, | ||
116 | { "vec3i", | ||
117 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
118 | const openvdb::math::Vec3<int32_t> value(-1,3,8); | ||
119 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec3<int32_t>>("test1", value); |
120 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
121 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec3<int32_t>>(value).copy()); |
122 | 1 | }, | |
123 | }, | ||
124 | { "vec3f", | ||
125 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
126 | const openvdb::math::Vec3<float> value(4.3f,-9.0f, 1.1f); | ||
127 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec3<float>>("test1", value); |
128 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
129 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec3<float>>(value).copy()); |
130 | 1 | }, | |
131 | }, | ||
132 | { "vec3d", | ||
133 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
134 | const openvdb::math::Vec3<double> value(8.2, 5.9, 1.6); | ||
135 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec3<double>>("test1", value); |
136 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
137 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec3<double>>(value).copy()); |
138 | 1 | }, | |
139 | }, | ||
140 | { "vec4i", | ||
141 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
142 | const openvdb::math::Vec4<int32_t> value(10,1,3,-8); | ||
143 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec4<int32_t>>("test1", value); |
144 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
145 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec4<int32_t>>(value).copy()); |
146 | 1 | }, | |
147 | }, | ||
148 | { "vec4f", | ||
149 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
150 | const openvdb::math::Vec4<float> value(4.4f, 3.3f, -0.1f, 0.3f); | ||
151 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec4<float>>("test1", value); |
152 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
153 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec4<float>>(value).copy()); |
154 | 1 | }, | |
155 | }, | ||
156 | { "vec4d", | ||
157 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
158 | const openvdb::math::Vec4<double> value(4.5, 5.3, 1.1, 3.3); | ||
159 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Vec4<double>>("test1", value); |
160 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
161 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Vec4<double>>(value).copy()); |
162 | 1 | }, | |
163 | }, | ||
164 | { "mat3f", | ||
165 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
166 | const openvdb::math::Mat3<float> value(1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f); | ||
167 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Mat3<float>>("test1", value); |
168 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
169 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Mat3<float>>(value).copy()); |
170 | 1 | }, | |
171 | }, | ||
172 | { "mat3d", | ||
173 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
174 | const openvdb::math::Mat3<double> value(6.7f, 2.9f,-1.1f, 3.2f, 2.2f, 0.8f, -5.1f, 9.3f, 2.5f); | ||
175 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Mat3<double>>("test1", value); |
176 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
177 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Mat3<double>>(value).copy()); |
178 | 1 | }, | |
179 | }, | ||
180 | { "mat4f", | ||
181 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
182 | const openvdb::math::Mat4<float> value(1.1f,-2.3f,-0.3f, 7.8f, -9.1f,-4.5f, 1.1f, 8.2f, -4.3f, 5.4f, 6.7f,-0.2f, 8.8f, 5.5f, -6.6f, 7.7f); | ||
183 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Mat4<float>>("test1", value); |
184 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
185 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Mat4<float>>(value).copy()); |
186 | 1 | }, | |
187 | }, | ||
188 | { "mat4d", | ||
189 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | [&](){ |
190 | const openvdb::math::Mat4<double> value(-2.3,0.0,-0.3,9.8, 0.0, 6.5, 3.7, 1.2, -7.8,-0.3,-5.5,3.3, -0.2, 9.1, 0.1,-9.1); | ||
191 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
2 | mHarness.addAttribute<openvdb::math::Mat4<double>>("test1", value); |
192 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
193 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
2 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::math::Mat4<double>>(value).copy()); |
194 | 1 | }, | |
195 | }, | ||
196 | { "string", | ||
197 | 1 | [&](){ | |
198 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
3 | mHarness.addAttribute<std::string>("test1", "foo"); |
199 | 1 | mHarness.mCustomData.reset(new openvdb::ax::CustomData()); | |
200 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
3 | mHarness.mCustomData->insertData("ext1", openvdb::TypedMetadata<openvdb::ax::codegen::String>("foo").copy()); |
201 | 1 | }, | |
202 | } | ||
203 |
20/42✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 1 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 1 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 1 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 1 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 1 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 1 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✗ Branch 58 not taken.
✓ Branch 59 taken 1 times.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
|
40 | }; |
204 | |||
205 |
2/2✓ Branch 0 taken 19 times.
✓ Branch 1 taken 1 times.
|
20 | for (const auto& expc : expected) { |
206 |
1/2✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
|
19 | mHarness.reset(); |
207 |
1/2✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
|
19 | expc.second.operator()(); |
208 |
3/6✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 19 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 19 times.
✗ Branch 8 not taken.
|
38 | this->execute("external_assign_from." + expc.first + ".ax"); |
209 | } | ||
210 | 1 | } | |
211 | |||
212 | |||
213 |