mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 18:05:31 +00:00
ValidationTest: Make custom device creation go through a virtual method
Previously tests that needed to use a device that wasn't the default device created a new one via a method that only supported customizing extensions. Instead of adding a second function the device creation is made completely customizable by querying the test's device via a overridable method. This heavily refactors the QuerySet tests to use the new methods (previously they were using 3 different devices in the same fixture) but loses a little bit of coverage of what happens when some query operations are done with mixed devices. This is required for a follow-up CL that adds tests for a device created with the "disallow_unsafe_api" toggle that needs to be set on device creation. Bug: chromium:1138528 Change-Id: Ic2f5d876adca251b34ea594f70f344ac7669910e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31442 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
71d2e1d23d
commit
43ef0a365b
@@ -38,9 +38,10 @@ class ErrorScopeValidationTest : public ValidationTest {
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ValidationTest::TearDown();
|
||||
|
||||
// Delete mocks so that expectations are checked
|
||||
mockDevicePopErrorScopeCallback = nullptr;
|
||||
ValidationTest::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user