| 121 | }; |
| 122 | |
| 123 | UTEST_F_SETUP(DebugCallback) |
| 124 | { |
| 125 | McResult err = mcCreateContext(&utest_fixture->context_, MC_DEBUG); |
| 126 | EXPECT_TRUE(utest_fixture->context_ != nullptr); |
| 127 | EXPECT_EQ(err, MC_NO_ERROR); |
| 128 | |
| 129 | // 1. Create meshes. |
| 130 | // ----------------- |
| 131 | // Shape to Cut: |
| 132 | utest_fixture->cubeVertices = { |
| 133 | -1, -1, 1, // 0 |
| 134 | 1, -1, 1, // 1 |
| 135 | -1, 1, 1, // 2 |
| 136 | 1, 1, 1, // 3 |
| 137 | -1, -1, -1, // 4 |
| 138 | 1, -1, -1, // 5 |
| 139 | -1, 1, -1, // 6 |
| 140 | 1, 1, -1 // 7 |
| 141 | }; |
| 142 | utest_fixture->cubeFaces = { |
| 143 | 0, 3, 2, // 0 |
| 144 | 0, 1, 3, // 1 |
| 145 | 1, 7, 3, // 2 |
| 146 | 1, 5, 7, // 3 |
| 147 | 5, 6, 7, // 4 |
| 148 | 5, 4, 6, // 5 |
| 149 | 4, 2, 6, // 6 |
| 150 | 4, 0, 2, // 7 |
| 151 | 2, 7, 6, // 8 |
| 152 | 2, 3, 7, // 9 |
| 153 | 4, 1, 0, // 10 |
| 154 | 4, 5, 1, // 11 |
| 155 | |
| 156 | }; |
| 157 | utest_fixture->numCubeVertices = 8; |
| 158 | utest_fixture->numCubeFaces = 12; |
| 159 | |
| 160 | utest_fixture->cubeFaceSizes = { |
| 161 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 |
| 162 | }; |
| 163 | |
| 164 | // Cutting Shape: |
| 165 | |
| 166 | utest_fixture->cutMeshVertices = { |
| 167 | -1.2, 1.6, 0.994070, |
| 168 | 1.4, -1.3, 0.994070, |
| 169 | -1.2, 1.6, -1.005929, |
| 170 | 1.4, -1.3, -1.005929 |
| 171 | }; |
| 172 | |
| 173 | utest_fixture->cutMeshFaces = { |
| 174 | 1, 2, 0, |
| 175 | 1, 3, 2 |
| 176 | }; |
| 177 | |
| 178 | utest_fixture->numCutMeshVertices = 4; |
| 179 | utest_fixture->numCutMeshFaces = 2; |
| 180 | } |
nothing calls this directly
no test coverage detected