From 3fe857a621b829d49cd85c8cc328d1221569e359 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 17 Mar 2021 19:10:27 +0000 Subject: [PATCH] ValidationTest: correctly assert deprecation warnings are emitted. Bug: dawn:642 Change-Id: If8601c50e4a14b5de5098398381c7a6c5e1f73fd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44867 Auto-Submit: Corentin Wallez Commit-Queue: Brandon Jones Reviewed-by: Austin Eng Reviewed-by: Brandon Jones --- src/tests/unittests/validation/ValidationTest.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/unittests/validation/ValidationTest.h b/src/tests/unittests/validation/ValidationTest.h index edab1a6958..9acdb3fc19 100644 --- a/src/tests/unittests/validation/ValidationTest.h +++ b/src/tests/unittests/validation/ValidationTest.h @@ -45,10 +45,11 @@ do { \ FlushWire(); \ size_t warningsBefore = dawn_native::GetDeprecationWarningCountForTesting(backendDevice); \ + EXPECT_EQ(mLastWarningCount, warningsBefore); \ statement; \ FlushWire(); \ size_t warningsAfter = dawn_native::GetDeprecationWarningCountForTesting(backendDevice); \ - EXPECT_EQ(mLastWarningCount, warningsBefore); \ + EXPECT_EQ(warningsAfter, warningsBefore + 1); \ mLastWarningCount = warningsAfter; \ } while (0)