diff --git a/src/tests/NXTTest.h b/src/tests/NXTTest.h index 7b50eb6a29..45c7f86858 100644 --- a/src/tests/NXTTest.h +++ b/src/tests/NXTTest.h @@ -48,7 +48,7 @@ struct RGBA8 { }; 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 { D3D12Backend, MetalBackend, @@ -163,15 +163,15 @@ class NXTTest : public ::testing::TestWithParam { }; // Instantiate the test once for each backend provided after the first argument. Use it like this: -// NXT_INSTANTIATE_TEST(MyTestFixture, MetalBackend, OpenGLBackend) -#define NXT_INSTANTIATE_TEST(testName, firstParam, ...) \ +// DAWN_INSTANTIATE_TEST(MyTestFixture, MetalBackend, OpenGLBackend) +#define DAWN_INSTANTIATE_TEST(testName, firstParam, ...) \ const decltype(firstParam) testName##params[] = { firstParam, ##__VA_ARGS__ }; \ INSTANTIATE_TEST_CASE_P(, testName, \ testing::ValuesIn(::detail::FilterBackends(testName##params, sizeof(testName##params) / sizeof(firstParam))), \ testing::PrintToStringParamName()); namespace detail { - // Helper functions used for NXT_INSTANTIATE_TEST + // Helper functions used for DAWN_INSTANTIATE_TEST bool IsBackendAvailable(BackendType type); std::vector FilterBackends(const BackendType* types, size_t numParams); diff --git a/src/tests/end2end/BasicTests.cpp b/src/tests/end2end/BasicTests.cpp index 0d0f2338d4..8637ee635a 100644 --- a/src/tests/end2end/BasicTests.cpp +++ b/src/tests/end2end/BasicTests.cpp @@ -33,4 +33,4 @@ TEST_P(BasicTests, BufferSetSubData) { EXPECT_BUFFER_U8_EQ(value, buffer, 0); } -NXT_INSTANTIATE_TEST(BasicTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) +DAWN_INSTANTIATE_TEST(BasicTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) diff --git a/src/tests/end2end/BlendStateTests.cpp b/src/tests/end2end/BlendStateTests.cpp index d1cbe3b06b..5d6cf57026 100644 --- a/src/tests/end2end/BlendStateTests.cpp +++ b/src/tests/end2end/BlendStateTests.cpp @@ -908,4 +908,4 @@ TEST_P(BlendStateTest, DefaultBlendColor) { } } -NXT_INSTANTIATE_TEST(BlendStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) +DAWN_INSTANTIATE_TEST(BlendStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) diff --git a/src/tests/end2end/BufferTests.cpp b/src/tests/end2end/BufferTests.cpp index 8e3661a8a0..cd8767d4e8 100644 --- a/src/tests/end2end/BufferTests.cpp +++ b/src/tests/end2end/BufferTests.cpp @@ -110,7 +110,7 @@ TEST_P(BufferMapReadTests, LargeRead) { buffer.Unmap(); } -NXT_INSTANTIATE_TEST(BufferMapReadTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) +DAWN_INSTANTIATE_TEST(BufferMapReadTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) class BufferMapWriteTests : public NXTTest { protected: @@ -187,7 +187,7 @@ TEST_P(BufferMapWriteTests, LargeWrite) { 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 { }; @@ -263,7 +263,7 @@ TEST_P(BufferSetSubDataTests, LargeSetSubData) { EXPECT_BUFFER_U32_RANGE_EQ(expectedData.data(), buffer, 0, kElements); } -NXT_INSTANTIATE_TEST(BufferSetSubDataTests, +DAWN_INSTANTIATE_TEST(BufferSetSubDataTests, D3D12Backend, MetalBackend, OpenGLBackend, diff --git a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp index d5d65a2f14..da64c98afc 100644 --- a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp +++ b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp @@ -183,7 +183,7 @@ TEST_P(ComputeCopyStorageBufferTests, DISABLED_UnsizedDescriptorArray) { })"); } -NXT_INSTANTIATE_TEST(ComputeCopyStorageBufferTests, +DAWN_INSTANTIATE_TEST(ComputeCopyStorageBufferTests, D3D12Backend, MetalBackend, OpenGLBackend, diff --git a/src/tests/end2end/CopyTests.cpp b/src/tests/end2end/CopyTests.cpp index 84b809f88c..19c883387c 100644 --- a/src/tests/end2end/CopyTests.cpp +++ b/src/tests/end2end/CopyTests.cpp @@ -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_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) diff --git a/src/tests/end2end/DepthStencilStateTests.cpp b/src/tests/end2end/DepthStencilStateTests.cpp index d0fb7fe7b2..05a7b1039e 100644 --- a/src/tests/end2end/DepthStencilStateTests.cpp +++ b/src/tests/end2end/DepthStencilStateTests.cpp @@ -505,7 +505,7 @@ TEST_P(DepthStencilStateTest, StencilDepthPass) { 2); // Replace the stencil on stencil pass, depth pass, so it should be 2 } -NXT_INSTANTIATE_TEST(DepthStencilStateTest, +DAWN_INSTANTIATE_TEST(DepthStencilStateTest, D3D12Backend, MetalBackend, OpenGLBackend, diff --git a/src/tests/end2end/DrawElementsTests.cpp b/src/tests/end2end/DrawElementsTests.cpp index ba570ca53e..906c87820c 100644 --- a/src/tests/end2end/DrawElementsTests.cpp +++ b/src/tests/end2end/DrawElementsTests.cpp @@ -106,4 +106,4 @@ TEST_P(DrawElementsTest, Uint32) { Test(6, 1, 0, 0, filled, filled); } -NXT_INSTANTIATE_TEST(DrawElementsTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) +DAWN_INSTANTIATE_TEST(DrawElementsTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) diff --git a/src/tests/end2end/IndexFormatTests.cpp b/src/tests/end2end/IndexFormatTests.cpp index da6a9c58c0..2a634f4c62 100644 --- a/src/tests/end2end/IndexFormatTests.cpp +++ b/src/tests/end2end/IndexFormatTests.cpp @@ -268,4 +268,4 @@ TEST_P(IndexFormatTest, DISABLED_SetIndexBufferBeforeSetPipeline) { 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) diff --git a/src/tests/end2end/InputStateTests.cpp b/src/tests/end2end/InputStateTests.cpp index 9de9cd7b92..8a4d18c13e 100644 --- a/src/tests/end2end/InputStateTests.cpp +++ b/src/tests/end2end/InputStateTests.cpp @@ -412,7 +412,7 @@ TEST_P(InputStateTest, MixedEverything) { 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: // - Add more vertex formats diff --git a/src/tests/end2end/PrimitiveTopologyTests.cpp b/src/tests/end2end/PrimitiveTopologyTests.cpp index 6f03326371..fdc8e7caa4 100644 --- a/src/tests/end2end/PrimitiveTopologyTests.cpp +++ b/src/tests/end2end/PrimitiveTopologyTests.cpp @@ -280,4 +280,4 @@ TEST_P(PrimitiveTopologyTest, TriangleStrip) { }); } -NXT_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) +DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) diff --git a/src/tests/end2end/PushConstantTests.cpp b/src/tests/end2end/PushConstantTests.cpp index cbd6b3be2d..a25cc07003 100644 --- a/src/tests/end2end/PushConstantTests.cpp +++ b/src/tests/end2end/PushConstantTests.cpp @@ -390,4 +390,4 @@ TEST_P(PushConstantTest, SimultaneousVertexAndFragmentConstants) { 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) diff --git a/src/tests/end2end/RenderPassLoadOpTests.cpp b/src/tests/end2end/RenderPassLoadOpTests.cpp index 7efcde361b..a9ed149d2d 100644 --- a/src/tests/end2end/RenderPassLoadOpTests.cpp +++ b/src/tests/end2end/RenderPassLoadOpTests.cpp @@ -165,4 +165,4 @@ TEST_P(RenderPassLoadOpTests, ColorClearThenLoadAndDraw) { 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) diff --git a/src/tests/end2end/SamplerTests.cpp b/src/tests/end2end/SamplerTests.cpp index 3c83b960e1..85c7b199eb 100644 --- a/src/tests/end2end/SamplerTests.cpp +++ b/src/tests/end2end/SamplerTests.cpp @@ -169,4 +169,4 @@ TEST_P(SamplerTest, AddressMode) { } } -NXT_INSTANTIATE_TEST(SamplerTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) +DAWN_INSTANTIATE_TEST(SamplerTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend) diff --git a/src/tests/end2end/ScissorTests.cpp b/src/tests/end2end/ScissorTests.cpp index c3d4f83684..188e045125 100644 --- a/src/tests/end2end/ScissorTests.cpp +++ b/src/tests/end2end/ScissorTests.cpp @@ -166,4 +166,4 @@ TEST_P(ScissorTest, NoInheritanceBetweenRenderPass) { 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) diff --git a/src/tests/end2end/ViewportOrientationTests.cpp b/src/tests/end2end/ViewportOrientationTests.cpp index 3c4de3ee95..c73b92916d 100644 --- a/src/tests/end2end/ViewportOrientationTests.cpp +++ b/src/tests/end2end/ViewportOrientationTests.cpp @@ -57,4 +57,4 @@ TEST_P(ViewportOrientationTests, OriginAt0x0) { 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)