| 186 | } |
| 187 | |
| 188 | UTEST_F(DebugCallback, MessageControl_EnableAll) |
| 189 | { |
| 190 | // config debug output |
| 191 | // ----------------------- |
| 192 | McSize numBytes = 0; |
| 193 | McFlags contextFlags = 0; |
| 194 | ASSERT_EQ(MC_NO_ERROR, mcGetInfo(utest_fixture->context_, MC_CONTEXT_FLAGS, 0, nullptr, &numBytes)); |
| 195 | |
| 196 | ASSERT_EQ(sizeof(McFlags), numBytes); |
| 197 | |
| 198 | ASSERT_EQ(MC_NO_ERROR, mcGetInfo(utest_fixture->context_, MC_CONTEXT_FLAGS, numBytes, &contextFlags, nullptr)); |
| 199 | |
| 200 | if (contextFlags & MC_DEBUG) { |
| 201 | mcDebugMessageCallback(utest_fixture->context_, mcDebugOutput, nullptr); |
| 202 | // enable all |
| 203 | mcDebugMessageControl(utest_fixture->context_, McDebugSource::MC_DEBUG_SOURCE_ALL, McDebugType::MC_DEBUG_TYPE_ALL, McDebugSeverity::MC_DEBUG_SEVERITY_ALL, true); |
| 204 | } |
| 205 | |
| 206 | ASSERT_EQ(MC_NO_ERROR, |
| 207 | mcDispatch(utest_fixture->context_, |
| 208 | MC_DISPATCH_VERTEX_ARRAY_DOUBLE, |
| 209 | utest_fixture->cubeVertices.data(), utest_fixture->cubeFaces.data(), utest_fixture->cubeFaceSizes.data(), utest_fixture->numCubeVertices, utest_fixture->numCubeFaces, |
| 210 | utest_fixture->cutMeshVertices.data(), utest_fixture->cutMeshFaces.data(), |
| 211 | nullptr, // cutMeshFaceSizes, // no need to give 'faceSizes' parameter since cut-mesh is a triangle mesh |
| 212 | utest_fixture->numCutMeshVertices, utest_fixture->numCutMeshFaces)); |
| 213 | } |
| 214 | |
| 215 | UTEST_F(DebugCallback, MessageControl_EnableOnlySevereErrors) |
| 216 | { |
nothing calls this directly
no test coverage detected