Disable lint warnings in fail stream test.

This CL marks the specific `bool` test as NOLINT in fail_stream to stop
the linter from emitting errors.

Change-Id: Ifa3d9b0a2e0f06bcd0d48cbe79f8dbe91fe7b4ef
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/17061
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
dan sinclair 2020-03-17 16:13:31 +00:00 committed by dan sinclair
parent 45d585f5ae
commit c83578038a
1 changed files with 5 additions and 5 deletions

View File

@ -33,23 +33,23 @@ TEST_F(FailStreamTest, ConversionToBoolIsSameAsStatusMethod) {
FailStream fs(&flag, nullptr); FailStream fs(&flag, nullptr);
EXPECT_TRUE(fs.status()); EXPECT_TRUE(fs.status());
EXPECT_TRUE(bool(fs)); EXPECT_TRUE(bool(fs)); // NOLINT
flag = false; flag = false;
EXPECT_FALSE(fs.status()); EXPECT_FALSE(fs.status());
EXPECT_FALSE(bool(fs)); EXPECT_FALSE(bool(fs)); // NOLINT
flag = true; flag = true;
EXPECT_TRUE(fs.status()); EXPECT_TRUE(fs.status());
EXPECT_TRUE(bool(fs)); EXPECT_TRUE(bool(fs)); // NOLINT
} }
TEST_F(FailStreamTest, FailMethodChangesStatusToFalse) { TEST_F(FailStreamTest, FailMethodChangesStatusToFalse) {
bool flag = true; bool flag = true;
FailStream fs(&flag, nullptr); FailStream fs(&flag, nullptr);
EXPECT_TRUE(flag); EXPECT_TRUE(flag);
EXPECT_TRUE(bool(fs)); EXPECT_TRUE(bool(fs)); // NOLINT
fs.Fail(); fs.Fail();
EXPECT_FALSE(flag); EXPECT_FALSE(flag);
EXPECT_FALSE(bool(fs)); EXPECT_FALSE(bool(fs)); // NOLINT
} }
TEST_F(FailStreamTest, FailMethodReturnsSelf) { TEST_F(FailStreamTest, FailMethodReturnsSelf) {