Integrate deprecation testing into DawnTestBase
This makes it a lot easier to modify old tests to test deprecation
behavior, and means we can mark all of the places that are going to
break in the deprecation CL (while we're thinking about it) instead of
the removal CL (which is weeks later).
It also makes it so all deprecation warnings in the tests will be
caught. Turns out that they were already clean.
Bug: dawn:520
Change-Id: I429f667207b88df04341179369bb6d24e034ca65
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31141
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp
index 569e682..7fa5c49 100644
--- a/src/tests/DawnTest.cpp
+++ b/src/tests/DawnTest.cpp
@@ -773,6 +773,11 @@
for (size_t i = 0; i < mReadbackSlots.size(); ++i) {
mReadbackSlots[i].buffer.Unmap();
}
+
+ if (!UsesWire()) {
+ EXPECT_EQ(mLastWarningCount,
+ dawn_native::GetDeprecationWarningCountForTesting(device.Get()));
+ }
}
void DawnTestBase::StartExpectDeviceError() {