Rename NXT_INSTANTIATE_TEST to DAWN_INSTANTIATE_TEST

This commit is contained in:
Corentin Wallez 2018-07-18 15:16:37 +02:00 committed by Corentin Wallez
parent be5ca38351
commit ae187efc80
16 changed files with 22 additions and 22 deletions

View File

@ -48,7 +48,7 @@ struct RGBA8 {
}; };
std::ostream& operator<< (std::ostream& stream, const RGBA8& color); std::ostream& operator<< (std::ostream& stream, const RGBA8& color);
// Backend types used in the NXT_INSTANTIATE_TEST // Backend types used in the DAWN_INSTANTIATE_TEST
enum BackendType { enum BackendType {
D3D12Backend, D3D12Backend,
MetalBackend, MetalBackend,
@ -163,15 +163,15 @@ 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, MetalBackend, OpenGLBackend) // DAWN_INSTANTIATE_TEST(MyTestFixture, MetalBackend, OpenGLBackend)
#define NXT_INSTANTIATE_TEST(testName, firstParam, ...) \ #define DAWN_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, \
testing::ValuesIn(::detail::FilterBackends(testName##params, sizeof(testName##params) / sizeof(firstParam))), \ testing::ValuesIn(::detail::FilterBackends(testName##params, sizeof(testName##params) / sizeof(firstParam))), \
testing::PrintToStringParamName()); testing::PrintToStringParamName());
namespace detail { namespace detail {
// Helper functions used for NXT_INSTANTIATE_TEST // Helper functions used for DAWN_INSTANTIATE_TEST
bool IsBackendAvailable(BackendType type); bool IsBackendAvailable(BackendType type);
std::vector<BackendType> FilterBackends(const BackendType* types, size_t numParams); std::vector<BackendType> FilterBackends(const BackendType* types, size_t numParams);

View File

@ -33,4 +33,4 @@ TEST_P(BasicTests, BufferSetSubData) {
EXPECT_BUFFER_U8_EQ(value, buffer, 0); EXPECT_BUFFER_U8_EQ(value, buffer, 0);
} }
NXT_INSTANTIATE_TEST(BasicTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(BasicTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -908,4 +908,4 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
} }
} }
NXT_INSTANTIATE_TEST(BlendStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(BlendStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -110,7 +110,7 @@ TEST_P(BufferMapReadTests, LargeRead) {
buffer.Unmap(); buffer.Unmap();
} }
NXT_INSTANTIATE_TEST(BufferMapReadTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(BufferMapReadTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)
class BufferMapWriteTests : public NXTTest { class BufferMapWriteTests : public NXTTest {
protected: protected:
@ -187,7 +187,7 @@ TEST_P(BufferMapWriteTests, LargeWrite) {
EXPECT_BUFFER_U32_RANGE_EQ(myData.data(), buffer, 0, kDataSize); EXPECT_BUFFER_U32_RANGE_EQ(myData.data(), buffer, 0, kDataSize);
} }
NXT_INSTANTIATE_TEST(BufferMapWriteTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(BufferMapWriteTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)
class BufferSetSubDataTests : public NXTTest { class BufferSetSubDataTests : public NXTTest {
}; };
@ -263,7 +263,7 @@ TEST_P(BufferSetSubDataTests, LargeSetSubData) {
EXPECT_BUFFER_U32_RANGE_EQ(expectedData.data(), buffer, 0, kElements); EXPECT_BUFFER_U32_RANGE_EQ(expectedData.data(), buffer, 0, kElements);
} }
NXT_INSTANTIATE_TEST(BufferSetSubDataTests, DAWN_INSTANTIATE_TEST(BufferSetSubDataTests,
D3D12Backend, D3D12Backend,
MetalBackend, MetalBackend,
OpenGLBackend, OpenGLBackend,

View File

@ -183,7 +183,7 @@ TEST_P(ComputeCopyStorageBufferTests, DISABLED_UnsizedDescriptorArray) {
})"); })");
} }
NXT_INSTANTIATE_TEST(ComputeCopyStorageBufferTests, DAWN_INSTANTIATE_TEST(ComputeCopyStorageBufferTests,
D3D12Backend, D3D12Backend,
MetalBackend, MetalBackend,
OpenGLBackend, OpenGLBackend,

View File

@ -347,7 +347,7 @@ TEST_P(CopyTests_T2B, RowPitchUnaligned) {
} }
} }
NXT_INSTANTIATE_TEST(CopyTests_T2B, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(CopyTests_T2B, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)
// Test that copying an entire texture with 256-byte aligned dimensions works // Test that copying an entire texture with 256-byte aligned dimensions works
TEST_P(CopyTests_B2T, FullTextureAligned) { TEST_P(CopyTests_B2T, FullTextureAligned) {
@ -490,4 +490,4 @@ TEST_P(CopyTests_B2T, RowPitchUnaligned) {
} }
} }
NXT_INSTANTIATE_TEST(CopyTests_B2T, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(CopyTests_B2T, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -505,7 +505,7 @@ TEST_P(DepthStencilStateTest, StencilDepthPass) {
2); // Replace the stencil on stencil pass, depth pass, so it should be 2 2); // Replace the stencil on stencil pass, depth pass, so it should be 2
} }
NXT_INSTANTIATE_TEST(DepthStencilStateTest, DAWN_INSTANTIATE_TEST(DepthStencilStateTest,
D3D12Backend, D3D12Backend,
MetalBackend, MetalBackend,
OpenGLBackend, OpenGLBackend,

View File

@ -106,4 +106,4 @@ TEST_P(DrawElementsTest, Uint32) {
Test(6, 1, 0, 0, filled, filled); Test(6, 1, 0, 0, filled, filled);
} }
NXT_INSTANTIATE_TEST(DrawElementsTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(DrawElementsTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -268,4 +268,4 @@ TEST_P(IndexFormatTest, DISABLED_SetIndexBufferBeforeSetPipeline) {
EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 255, 0, 255), renderPass.color, 100, 300); EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 255, 0, 255), renderPass.color, 100, 300);
} }
NXT_INSTANTIATE_TEST(IndexFormatTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(IndexFormatTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -412,7 +412,7 @@ TEST_P(InputStateTest, MixedEverything) {
DoTestDraw(pipeline, 1, 1, {{0, &buffer0}, {1, &buffer1}}); DoTestDraw(pipeline, 1, 1, {{0, &buffer0}, {1, &buffer1}});
} }
NXT_INSTANTIATE_TEST(InputStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(InputStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)
// TODO for the input state: // TODO for the input state:
// - Add more vertex formats // - Add more vertex formats

View File

@ -280,4 +280,4 @@ TEST_P(PrimitiveTopologyTest, TriangleStrip) {
}); });
} }
NXT_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -390,4 +390,4 @@ TEST_P(PushConstantTest, SimultaneousVertexAndFragmentConstants) {
EXPECT_PIXEL_RGBA8_EQ(RGBA8(1, 1, 0, 0), renderPass.color, 0, 0); EXPECT_PIXEL_RGBA8_EQ(RGBA8(1, 1, 0, 0), renderPass.color, 0, 0);
} }
NXT_INSTANTIATE_TEST(PushConstantTest, MetalBackend, OpenGLBackend) DAWN_INSTANTIATE_TEST(PushConstantTest, MetalBackend, OpenGLBackend)

View File

@ -165,4 +165,4 @@ TEST_P(RenderPassLoadOpTests, ColorClearThenLoadAndDraw) {
EXPECT_TEXTURE_RGBA8_EQ(expectBlue.data(), renderTarget, kRTSize / 2, 0, kRTSize / 2, kRTSize, 0); EXPECT_TEXTURE_RGBA8_EQ(expectBlue.data(), renderTarget, kRTSize / 2, 0, kRTSize / 2, kRTSize, 0);
} }
NXT_INSTANTIATE_TEST(RenderPassLoadOpTests, D3D12Backend, MetalBackend, OpenGLBackend) DAWN_INSTANTIATE_TEST(RenderPassLoadOpTests, D3D12Backend, MetalBackend, OpenGLBackend)

View File

@ -169,4 +169,4 @@ TEST_P(SamplerTest, AddressMode) {
} }
} }
NXT_INSTANTIATE_TEST(SamplerTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(SamplerTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -166,4 +166,4 @@ TEST_P(ScissorTest, NoInheritanceBetweenRenderPass) {
EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 255, 0, 255), renderPass.color, 99, 99); EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 255, 0, 255), renderPass.color, 99, 99);
} }
NXT_INSTANTIATE_TEST(ScissorTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(ScissorTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)

View File

@ -57,4 +57,4 @@ TEST_P(ViewportOrientationTests, OriginAt0x0) {
EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 0, 0, 0), renderPass.color, 1, 1); EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 0, 0, 0), renderPass.color, 1, 1);
} }
NXT_INSTANTIATE_TEST(ViewportOrientationTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) DAWN_INSTANTIATE_TEST(ViewportOrientationTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend)