1 // Copyright 2020 The Dawn Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // This file contains test for deprecated parts of Dawn's API while following WebGPU's evolution. 16 // It contains test for the "old" behavior that will be deleted once users are migrated, tests that 17 // a deprecation warning is emitted when the "old" behavior is used, and tests that an error is 18 // emitted when both the old and the new behavior are used (when applicable). 19 20 #include "tests/DawnTest.h" 21 22 #include "common/Constants.h" 23 #include "utils/ComboRenderPipelineDescriptor.h" 24 #include "utils/WGPUHelpers.h" 25 26 #include <cmath> 27 28 class DeprecationTests : public DawnTest { 29 protected: SetUp()30 void SetUp() override { 31 DawnTest::SetUp(); 32 // Skip when validation is off because warnings might be emitted during validation calls 33 DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("skip_validation")); 34 } 35 }; 36 37 DAWN_INSTANTIATE_TEST(DeprecationTests, 38 D3D12Backend(), 39 MetalBackend(), 40 NullBackend(), 41 OpenGLBackend(), 42 OpenGLESBackend(), 43 VulkanBackend()); 44