Fix warnings in IndexFormatTests

This commit is contained in:
Corentin Wallez 2017-11-20 15:48:58 -05:00 committed by Corentin Wallez
parent 33f7bfe322
commit f40d8c545c
2 changed files with 11 additions and 9 deletions

View File

@ -131,7 +131,7 @@ class NXTTest : public ::testing::TestWithParam<BackendType> {
}; };
// Instantiate the test once for each backend provided after the first argument. Use it like this: // Instantiate the test once for each backend provided after the first argument. Use it like this:
// NXT_INSTANTIATE_TEST(MyTestFixture, OpenGLBackend, MetalBackend) // NXT_INSTANTIATE_TEST(MyTestFixture, MetalBackend, OpenGLBackend)
#define NXT_INSTANTIATE_TEST(testName, firstParam, ...) \ #define NXT_INSTANTIATE_TEST(testName, firstParam, ...) \
const decltype(firstParam) testName##params[] = { firstParam, ##__VA_ARGS__ }; \ const decltype(firstParam) testName##params[] = { firstParam, ##__VA_ARGS__ }; \
INSTANTIATE_TEST_CASE_P(, testName, \ INSTANTIATE_TEST_CASE_P(, testName, \

View File

@ -153,13 +153,15 @@ TEST_P(IndexFormatTest, Uint16) {
// Test for primitive restart use vertices like in the drawing and draw the following // Test for primitive restart use vertices like in the drawing and draw the following
// indices: 0 1 2 PRIM_RESTART 3 4 2. Then A and B should be written but not C. // indices: 0 1 2 PRIM_RESTART 3 4 2. Then A and B should be written but not C.
// 0 // |--------------|
// |\ // | 0 |
// |B \ // | |\ |
// 2---1 // | |B \ |
// /| C // | 2---1 |
// / A| // | /| C |
// 4---3 // | / A| |
// | 4---3 |
// |--------------|
// Test use of primitive restart with an Uint32 index format // Test use of primitive restart with an Uint32 index format
TEST_P(IndexFormatTest, Uint32PrimitiveRestart) { TEST_P(IndexFormatTest, Uint32PrimitiveRestart) {
@ -265,4 +267,4 @@ TEST_P(IndexFormatTest, ChangePipelineAfterSetIndexBuffer) {
EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 255, 0, 255), renderTarget, 100, 100); EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 255, 0, 255), renderTarget, 100, 100);
} }
NXT_INSTANTIATE_TEST(IndexFormatTest, MetalBackend) NXT_INSTANTIATE_TEST(IndexFormatTest, MetalBackend, OpenGLBackend)