Print the failing statement in ASSERT_DEVICE_ERROR
Makes it easier to track where and why a test failed. Bug: none Change-Id: Icdccde97db68c32c35af6c044a3eacd4d4978b61 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19701 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
319672791e
commit
3aa5be9749
|
@ -63,7 +63,11 @@
|
|||
StartExpectDeviceError(); \
|
||||
statement; \
|
||||
FlushWire(); \
|
||||
ASSERT_TRUE(EndExpectDeviceError())
|
||||
if (!EndExpectDeviceError()) { \
|
||||
FAIL() << "Expected device error in:\n " << #statement; \
|
||||
} \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
struct RGBA8 {
|
||||
constexpr RGBA8() : RGBA8(0, 0, 0, 0) {
|
||||
|
|
|
@ -22,7 +22,11 @@
|
|||
#define ASSERT_DEVICE_ERROR(statement) \
|
||||
StartExpectDeviceError(); \
|
||||
statement; \
|
||||
ASSERT_TRUE(EndExpectDeviceError())
|
||||
if (!EndExpectDeviceError()) { \
|
||||
FAIL() << "Expected device error in:\n " << #statement; \
|
||||
} \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
class ValidationTest : public testing::Test {
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue