From 40dc5d3f21e2d73e222556766214a838394420ca Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Fri, 15 May 2020 22:06:35 +0000 Subject: [PATCH] Cleanup: Remove unnecessary TestSetUp overload Bug: dawn:396 Change-Id: I9d12fb983ea3ef3a01b569caff453a441ab86c70 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21700 Commit-Queue: Austin Eng Reviewed-by: Corentin Wallez Reviewed-by: Stephen White --- src/tests/DawnTest.h | 14 ++------------ src/tests/end2end/ColorStateTests.cpp | 4 ++-- src/tests/end2end/D3D12ResourceWrappingTests.cpp | 4 ++-- src/tests/end2end/DeprecatedAPITests.cpp | 4 +++- src/tests/end2end/DepthSamplingTests.cpp | 4 ++-- src/tests/end2end/DepthStencilStateTests.cpp | 4 ++-- src/tests/end2end/DestroyTests.cpp | 4 ++-- src/tests/end2end/DeviceLostTests.cpp | 6 +++--- src/tests/end2end/DrawIndexedIndirectTests.cpp | 4 ++-- src/tests/end2end/DrawIndexedTests.cpp | 4 ++-- src/tests/end2end/DrawIndirectTests.cpp | 4 ++-- src/tests/end2end/DrawTests.cpp | 4 ++-- src/tests/end2end/DynamicBufferOffsetTests.cpp | 4 ++-- src/tests/end2end/FenceTests.cpp | 4 ++-- src/tests/end2end/IndexFormatTests.cpp | 4 ++-- src/tests/end2end/MultisampledRenderingTests.cpp | 4 ++-- src/tests/end2end/NonzeroTextureCreationTests.cpp | 4 ++-- src/tests/end2end/OpArrayLengthTests.cpp | 4 ++-- src/tests/end2end/PrimitiveTopologyTests.cpp | 4 ++-- src/tests/end2end/RenderBundleTests.cpp | 4 ++-- src/tests/end2end/RenderPassLoadOpTests.cpp | 4 ++-- src/tests/end2end/RenderPassTests.cpp | 4 ++-- src/tests/end2end/SamplerTests.cpp | 4 ++-- src/tests/end2end/SwapChainTests.cpp | 4 +++- src/tests/end2end/SwapChainValidationTests.cpp | 4 +++- src/tests/end2end/TextureFormatTests.cpp | 4 ++-- src/tests/end2end/TextureViewTests.cpp | 4 ++-- src/tests/end2end/TextureZeroInitTests.cpp | 4 ++-- src/tests/end2end/VertexFormatTests.cpp | 4 ++-- src/tests/end2end/VertexStateTests.cpp | 4 ++-- src/tests/perf_tests/BufferUploadPerf.cpp | 6 +++--- src/tests/perf_tests/DrawCallPerf.cpp | 6 +++--- src/tests/white_box/D3D12DescriptorHeapTests.cpp | 3 ++- src/tests/white_box/D3D12ResidencyTests.cpp | 3 ++- src/tests/white_box/MetalAutoreleasePoolTests.mm | 3 ++- src/tests/white_box/VulkanErrorInjectorTests.cpp | 3 ++- .../white_box/VulkanImageWrappingTestsDmaBuf.cpp | 6 +++--- .../white_box/VulkanImageWrappingTestsOpaqueFD.cpp | 11 ++++++----- 38 files changed, 87 insertions(+), 86 deletions(-) diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h index e986f679fa..f80197fab3 100644 --- a/src/tests/DawnTest.h +++ b/src/tests/DawnTest.h @@ -356,22 +356,12 @@ class DawnTestBase { template class DawnTestWithParams : public DawnTestBase, public ::testing::TestWithParam { - private: - void SetUp() override final { - // DawnTestBase::SetUp() creates the device and wire. - // It was separate from TestSetUp() so we can skip tests completely if no adapter - // is available. - // TODO(enga): There is now always an available adapter otherwise we fail test environment - // SetUp. Consider removing the extra TestSetUp() overload. - DawnTestBase::SetUp(); - TestSetUp(); - } - protected: DawnTestWithParams(); ~DawnTestWithParams() override = default; - virtual void TestSetUp() { + void SetUp() override { + DawnTestBase::SetUp(); } void TearDown() override { diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/tests/end2end/ColorStateTests.cpp index d8bcbbc61e..769ccd858f 100644 --- a/src/tests/end2end/ColorStateTests.cpp +++ b/src/tests/end2end/ColorStateTests.cpp @@ -26,8 +26,8 @@ constexpr static unsigned int kRTSize = 64; class ColorStateTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); vsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"( #version 450 diff --git a/src/tests/end2end/D3D12ResourceWrappingTests.cpp b/src/tests/end2end/D3D12ResourceWrappingTests.cpp index a07e5ab29a..9466f76732 100644 --- a/src/tests/end2end/D3D12ResourceWrappingTests.cpp +++ b/src/tests/end2end/D3D12ResourceWrappingTests.cpp @@ -29,8 +29,8 @@ namespace { class D3D12ResourceTestBase : public DawnTest { public: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); if (UsesWire()) { return; } diff --git a/src/tests/end2end/DeprecatedAPITests.cpp b/src/tests/end2end/DeprecatedAPITests.cpp index 0c29933b61..76e9e821bf 100644 --- a/src/tests/end2end/DeprecatedAPITests.cpp +++ b/src/tests/end2end/DeprecatedAPITests.cpp @@ -25,7 +25,8 @@ class DeprecationTests : public DawnTest { protected: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); // Skip when validation is off because warnings might be emitted during validation calls DAWN_SKIP_TEST_IF(IsDawnValidationSkipped()); } @@ -35,6 +36,7 @@ class DeprecationTests : public DawnTest { EXPECT_EQ(mLastWarningCount, dawn_native::GetDeprecationWarningCountForTesting(device.Get())); } + DawnTest::TearDown(); } size_t mLastWarningCount = 0; diff --git a/src/tests/end2end/DepthSamplingTests.cpp b/src/tests/end2end/DepthSamplingTests.cpp index 0902975fd2..a8d08df30e 100644 --- a/src/tests/end2end/DepthSamplingTests.cpp +++ b/src/tests/end2end/DepthSamplingTests.cpp @@ -41,8 +41,8 @@ namespace { class DepthSamplingTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); wgpu::BufferDescriptor uniformBufferDesc; uniformBufferDesc.usage = wgpu::BufferUsage::Uniform | wgpu::BufferUsage::CopyDst; diff --git a/src/tests/end2end/DepthStencilStateTests.cpp b/src/tests/end2end/DepthStencilStateTests.cpp index f0c30238e8..80040ec4ef 100644 --- a/src/tests/end2end/DepthStencilStateTests.cpp +++ b/src/tests/end2end/DepthStencilStateTests.cpp @@ -22,8 +22,8 @@ constexpr static unsigned int kRTSize = 64; class DepthStencilStateTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); wgpu::TextureDescriptor renderTargetDescriptor; renderTargetDescriptor.dimension = wgpu::TextureDimension::e2D; diff --git a/src/tests/end2end/DestroyTests.cpp b/src/tests/end2end/DestroyTests.cpp index c2c47eee6a..82c43a64eb 100644 --- a/src/tests/end2end/DestroyTests.cpp +++ b/src/tests/end2end/DestroyTests.cpp @@ -21,8 +21,8 @@ constexpr uint32_t kRTSize = 4; class DestroyTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(IsDawnValidationSkipped()); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/DeviceLostTests.cpp b/src/tests/end2end/DeviceLostTests.cpp index 6ee0367aa0..5aa0263fce 100644 --- a/src/tests/end2end/DeviceLostTests.cpp +++ b/src/tests/end2end/DeviceLostTests.cpp @@ -56,16 +56,16 @@ static const int fakeUserData = 0; class DeviceLostTest : public DawnTest { protected: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); - DawnTest::TestSetUp(); mockDeviceLostCallback = std::make_unique(); mockFenceOnCompletionCallback = std::make_unique(); } void TearDown() override { - DawnTest::TearDown(); mockDeviceLostCallback = nullptr; + DawnTest::TearDown(); } void SetCallbackAndLoseForTesting() { diff --git a/src/tests/end2end/DrawIndexedIndirectTests.cpp b/src/tests/end2end/DrawIndexedIndirectTests.cpp index 1b721cad2e..a8e8c126e4 100644 --- a/src/tests/end2end/DrawIndexedIndirectTests.cpp +++ b/src/tests/end2end/DrawIndexedIndirectTests.cpp @@ -21,8 +21,8 @@ constexpr uint32_t kRTSize = 4; class DrawIndexedIndirectTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/DrawIndexedTests.cpp b/src/tests/end2end/DrawIndexedTests.cpp index e15ed527bb..48abdadce7 100644 --- a/src/tests/end2end/DrawIndexedTests.cpp +++ b/src/tests/end2end/DrawIndexedTests.cpp @@ -21,8 +21,8 @@ constexpr uint32_t kRTSize = 4; class DrawIndexedTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/DrawIndirectTests.cpp b/src/tests/end2end/DrawIndirectTests.cpp index c127b54882..3f14375733 100644 --- a/src/tests/end2end/DrawIndirectTests.cpp +++ b/src/tests/end2end/DrawIndirectTests.cpp @@ -21,8 +21,8 @@ constexpr uint32_t kRTSize = 4; class DrawIndirectTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/DrawTests.cpp b/src/tests/end2end/DrawTests.cpp index d028912ada..b4673bfedf 100644 --- a/src/tests/end2end/DrawTests.cpp +++ b/src/tests/end2end/DrawTests.cpp @@ -21,8 +21,8 @@ constexpr uint32_t kRTSize = 4; class DrawTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/DynamicBufferOffsetTests.cpp b/src/tests/end2end/DynamicBufferOffsetTests.cpp index 1798242408..d60f493f32 100644 --- a/src/tests/end2end/DynamicBufferOffsetTests.cpp +++ b/src/tests/end2end/DynamicBufferOffsetTests.cpp @@ -24,8 +24,8 @@ constexpr uint32_t kBindingSize = 8; class DynamicBufferOffsetTests : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); // Mix up dynamic and non dynamic resources in one bind group and using not continuous // binding number to cover more cases. diff --git a/src/tests/end2end/FenceTests.cpp b/src/tests/end2end/FenceTests.cpp index cba7dd33d3..20d3e6ce2a 100644 --- a/src/tests/end2end/FenceTests.cpp +++ b/src/tests/end2end/FenceTests.cpp @@ -60,8 +60,8 @@ class FenceTests : public DawnTest { FenceTests() : mCallIndex(0) { } - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); mockFenceOnCompletionCallback = std::make_unique(); mockPopErrorScopeCallback = std::make_unique(); } diff --git a/src/tests/end2end/IndexFormatTests.cpp b/src/tests/end2end/IndexFormatTests.cpp index 4437260039..ea83e9184c 100644 --- a/src/tests/end2end/IndexFormatTests.cpp +++ b/src/tests/end2end/IndexFormatTests.cpp @@ -22,8 +22,8 @@ constexpr uint32_t kRTSize = 400; class IndexFormatTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); } diff --git a/src/tests/end2end/MultisampledRenderingTests.cpp b/src/tests/end2end/MultisampledRenderingTests.cpp index 8cd177ffe5..cc3b3c3d7d 100644 --- a/src/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/tests/end2end/MultisampledRenderingTests.cpp @@ -20,8 +20,8 @@ class MultisampledRenderingTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); InitTexturesForTest(); } diff --git a/src/tests/end2end/NonzeroTextureCreationTests.cpp b/src/tests/end2end/NonzeroTextureCreationTests.cpp index d9fa56cd4b..7cdafd521e 100644 --- a/src/tests/end2end/NonzeroTextureCreationTests.cpp +++ b/src/tests/end2end/NonzeroTextureCreationTests.cpp @@ -20,8 +20,8 @@ class NonzeroTextureCreationTests : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); } constexpr static uint32_t kSize = 128; diff --git a/src/tests/end2end/OpArrayLengthTests.cpp b/src/tests/end2end/OpArrayLengthTests.cpp index fa795bfb87..3e6a043869 100644 --- a/src/tests/end2end/OpArrayLengthTests.cpp +++ b/src/tests/end2end/OpArrayLengthTests.cpp @@ -20,8 +20,8 @@ class OpArrayLengthTest : public DawnTest { protected: - void TestSetUp() { - DawnTest::TestSetUp(); + void SetUp() { + DawnTest::SetUp(); // Create buffers of various size to check the length() implementation wgpu::BufferDescriptor bufferDesc; diff --git a/src/tests/end2end/PrimitiveTopologyTests.cpp b/src/tests/end2end/PrimitiveTopologyTests.cpp index 7710b126dd..822bfee3a4 100644 --- a/src/tests/end2end/PrimitiveTopologyTests.cpp +++ b/src/tests/end2end/PrimitiveTopologyTests.cpp @@ -145,8 +145,8 @@ constexpr static float kVertices[] = { class PrimitiveTopologyTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/RenderBundleTests.cpp b/src/tests/end2end/RenderBundleTests.cpp index 5ee766e8e2..0df87c3474 100644 --- a/src/tests/end2end/RenderBundleTests.cpp +++ b/src/tests/end2end/RenderBundleTests.cpp @@ -26,8 +26,8 @@ const RGBA8 kColors[2] = {RGBA8::kGreen, RGBA8::kBlue}; // tested in all other rendering tests. class RenderBundleTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/RenderPassLoadOpTests.cpp b/src/tests/end2end/RenderPassLoadOpTests.cpp index 943b86f2f3..618f9c04df 100644 --- a/src/tests/end2end/RenderPassLoadOpTests.cpp +++ b/src/tests/end2end/RenderPassLoadOpTests.cpp @@ -54,8 +54,8 @@ class DrawQuad { class RenderPassLoadOpTests : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); wgpu::TextureDescriptor descriptor; descriptor.dimension = wgpu::TextureDimension::e2D; diff --git a/src/tests/end2end/RenderPassTests.cpp b/src/tests/end2end/RenderPassTests.cpp index a7fe522040..c157a920aa 100644 --- a/src/tests/end2end/RenderPassTests.cpp +++ b/src/tests/end2end/RenderPassTests.cpp @@ -22,8 +22,8 @@ constexpr wgpu::TextureFormat kFormat = wgpu::TextureFormat::RGBA8Unorm; class RenderPassTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); // Shaders to draw a bottom-left triangle in blue. mVSModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"( diff --git a/src/tests/end2end/SamplerTests.cpp b/src/tests/end2end/SamplerTests.cpp index b476b34d23..1c38a4cba9 100644 --- a/src/tests/end2end/SamplerTests.cpp +++ b/src/tests/end2end/SamplerTests.cpp @@ -50,8 +50,8 @@ namespace { class SamplerTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); mRenderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); auto vsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"( diff --git a/src/tests/end2end/SwapChainTests.cpp b/src/tests/end2end/SwapChainTests.cpp index c16976e94b..bfa10a1ca6 100644 --- a/src/tests/end2end/SwapChainTests.cpp +++ b/src/tests/end2end/SwapChainTests.cpp @@ -23,7 +23,8 @@ class SwapChainTests : public DawnTest { public: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); glfwSetErrorCallback([](int code, const char* message) { @@ -58,6 +59,7 @@ class SwapChainTests : public DawnTest { if (window != nullptr) { glfwDestroyWindow(window); } + DawnTest::TearDown(); } void ClearTexture(wgpu::TextureView view, wgpu::Color color) { diff --git a/src/tests/end2end/SwapChainValidationTests.cpp b/src/tests/end2end/SwapChainValidationTests.cpp index 7199a37cf0..b4a76d4212 100644 --- a/src/tests/end2end/SwapChainValidationTests.cpp +++ b/src/tests/end2end/SwapChainValidationTests.cpp @@ -24,7 +24,8 @@ class SwapChainValidationTests : public DawnTest { public: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); DAWN_SKIP_TEST_IF(IsDawnValidationSkipped()); @@ -59,6 +60,7 @@ class SwapChainValidationTests : public DawnTest { if (window != nullptr) { glfwDestroyWindow(window); } + DawnTest::TearDown(); } protected: diff --git a/src/tests/end2end/TextureFormatTests.cpp b/src/tests/end2end/TextureFormatTests.cpp index 24304a3435..cad0bc9a3c 100644 --- a/src/tests/end2end/TextureFormatTests.cpp +++ b/src/tests/end2end/TextureFormatTests.cpp @@ -112,8 +112,8 @@ class ExpectFloat16 : public detail::Expectation { class TextureFormatTest : public DawnTest { protected: - void TestSetUp() { - DawnTest::TestSetUp(); + void SetUp() { + DawnTest::SetUp(); } // Structure containing all the information that tests need to know about the format. diff --git a/src/tests/end2end/TextureViewTests.cpp b/src/tests/end2end/TextureViewTests.cpp index b133d7b44c..9f51d2e6fa 100644 --- a/src/tests/end2end/TextureViewTests.cpp +++ b/src/tests/end2end/TextureViewTests.cpp @@ -78,8 +78,8 @@ protected: return static_cast(level * 10) + static_cast(layer + 1); } - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); mRenderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/tests/end2end/TextureZeroInitTests.cpp index b71f766add..95e8119144 100644 --- a/src/tests/end2end/TextureZeroInitTests.cpp +++ b/src/tests/end2end/TextureZeroInitTests.cpp @@ -32,9 +32,9 @@ class TextureZeroInitTest : public DawnTest { protected: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); - DawnTest::TestSetUp(); } wgpu::TextureDescriptor CreateTextureDescriptor(uint32_t mipLevelCount, uint32_t arrayLayerCount, diff --git a/src/tests/end2end/VertexFormatTests.cpp b/src/tests/end2end/VertexFormatTests.cpp index 8802d0c49b..6030adc296 100644 --- a/src/tests/end2end/VertexFormatTests.cpp +++ b/src/tests/end2end/VertexFormatTests.cpp @@ -46,8 +46,8 @@ std::vector BitCast(std::vector data) { class VertexFormatTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); } diff --git a/src/tests/end2end/VertexStateTests.cpp b/src/tests/end2end/VertexStateTests.cpp index 330cbd5768..404cdf2e4c 100644 --- a/src/tests/end2end/VertexStateTests.cpp +++ b/src/tests/end2end/VertexStateTests.cpp @@ -36,8 +36,8 @@ constexpr static unsigned int kRTCellSize = 100; class VertexStateTest : public DawnTest { protected: - void TestSetUp() override { - DawnTest::TestSetUp(); + void SetUp() override { + DawnTest::SetUp(); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); } diff --git a/src/tests/perf_tests/BufferUploadPerf.cpp b/src/tests/perf_tests/BufferUploadPerf.cpp index 11b68ab507..5849bbaa20 100644 --- a/src/tests/perf_tests/BufferUploadPerf.cpp +++ b/src/tests/perf_tests/BufferUploadPerf.cpp @@ -92,7 +92,7 @@ class BufferUploadPerf : public DawnPerfTestWithParams { } ~BufferUploadPerf() override = default; - void TestSetUp() override; + void SetUp() override; private: void Step() override; @@ -101,8 +101,8 @@ class BufferUploadPerf : public DawnPerfTestWithParams { std::vector data; }; -void BufferUploadPerf::TestSetUp() { - DawnPerfTestWithParams::TestSetUp(); +void BufferUploadPerf::SetUp() { + DawnPerfTestWithParams::SetUp(); wgpu::BufferDescriptor desc = {}; desc.size = data.size(); diff --git a/src/tests/perf_tests/DrawCallPerf.cpp b/src/tests/perf_tests/DrawCallPerf.cpp index 9bfd8bf973..72e837ace1 100644 --- a/src/tests/perf_tests/DrawCallPerf.cpp +++ b/src/tests/perf_tests/DrawCallPerf.cpp @@ -227,7 +227,7 @@ class DrawCallPerf : public DawnPerfTestWithParams { } ~DrawCallPerf() override = default; - void TestSetUp() override; + void SetUp() override; protected: DrawCallParam GetParam() const { @@ -267,8 +267,8 @@ class DrawCallPerf : public DawnPerfTestWithParams { wgpu::RenderBundle mRenderBundle; }; -void DrawCallPerf::TestSetUp() { - DawnPerfTestWithParams::TestSetUp(); +void DrawCallPerf::SetUp() { + DawnPerfTestWithParams::SetUp(); // Compute aligned uniform / vertex data sizes. mAlignedUniformSize = Align(kUniformSize, kMinDynamicBufferOffsetAlignment); diff --git a/src/tests/white_box/D3D12DescriptorHeapTests.cpp b/src/tests/white_box/D3D12DescriptorHeapTests.cpp index bdb18c1425..cbe7dcba94 100644 --- a/src/tests/white_box/D3D12DescriptorHeapTests.cpp +++ b/src/tests/white_box/D3D12DescriptorHeapTests.cpp @@ -33,7 +33,8 @@ using namespace dawn_native::d3d12; class D3D12DescriptorHeapTests : public DawnTest { protected: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); mD3DDevice = reinterpret_cast(device.Get()); diff --git a/src/tests/white_box/D3D12ResidencyTests.cpp b/src/tests/white_box/D3D12ResidencyTests.cpp index b8ac1ba17e..0a272d1737 100644 --- a/src/tests/white_box/D3D12ResidencyTests.cpp +++ b/src/tests/white_box/D3D12ResidencyTests.cpp @@ -34,7 +34,8 @@ constexpr wgpu::BufferUsage kNonMappableBufferUsage = wgpu::BufferUsage::CopyDst class D3D12ResidencyTests : public DawnTest { protected: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); // Restrict Dawn's budget to create an artificial budget. diff --git a/src/tests/white_box/MetalAutoreleasePoolTests.mm b/src/tests/white_box/MetalAutoreleasePoolTests.mm index 377c08d63e..6c0a850ba2 100644 --- a/src/tests/white_box/MetalAutoreleasePoolTests.mm +++ b/src/tests/white_box/MetalAutoreleasePoolTests.mm @@ -20,7 +20,8 @@ using namespace dawn_native::metal; class MetalAutoreleasePoolTests : public DawnTest { private: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); mMtlDevice = reinterpret_cast(device.Get()); diff --git a/src/tests/white_box/VulkanErrorInjectorTests.cpp b/src/tests/white_box/VulkanErrorInjectorTests.cpp index 23872ec1ab..0a5bde6437 100644 --- a/src/tests/white_box/VulkanErrorInjectorTests.cpp +++ b/src/tests/white_box/VulkanErrorInjectorTests.cpp @@ -25,7 +25,8 @@ namespace { class VulkanErrorInjectorTests : public DawnTest { public: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); DAWN_SKIP_TEST_IF(UsesWire()); mDeviceVk = reinterpret_cast(device.Get()); diff --git a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp index 4ba327e375..0e3324c255 100644 --- a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp +++ b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp @@ -34,7 +34,7 @@ namespace dawn_native { namespace vulkan { class VulkanImageWrappingTestBase : public DawnTest { public: - void TestSetUp() override { + void SetUp() override { DAWN_SKIP_TEST_IF(UsesWire()); gbmDevice = CreateGbmDevice(); @@ -264,8 +264,8 @@ namespace dawn_native { namespace vulkan { // These tests are skipped if the harness is using the wire. class VulkanImageWrappingUsageTests : public VulkanImageWrappingTestBase { public: - void TestSetUp() override { - VulkanImageWrappingTestBase::TestSetUp(); + void SetUp() override { + VulkanImageWrappingTestBase::SetUp(); if (UsesWire()) { return; } diff --git a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp index b897e62af2..e60e1ff5b3 100644 --- a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp +++ b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp @@ -31,7 +31,8 @@ namespace dawn_native { namespace vulkan { class VulkanImageWrappingTestBase : public DawnTest { public: - void TestSetUp() override { + void SetUp() override { + DawnTest::SetUp(); if (UsesWire()) { return; } @@ -200,8 +201,8 @@ namespace dawn_native { namespace vulkan { class VulkanImageWrappingValidationTests : public VulkanImageWrappingTestBase { public: - void TestSetUp() override { - VulkanImageWrappingTestBase::TestSetUp(); + void SetUp() override { + VulkanImageWrappingTestBase::SetUp(); if (UsesWire()) { return; } @@ -352,8 +353,8 @@ namespace dawn_native { namespace vulkan { // These tests are skipped if the harness is using the wire. class VulkanImageWrappingUsageTests : public VulkanImageWrappingTestBase { public: - void TestSetUp() override { - VulkanImageWrappingTestBase::TestSetUp(); + void SetUp() override { + VulkanImageWrappingTestBase::SetUp(); if (UsesWire()) { return; }