Replace assert with CHECK (#1098)

This commit is contained in:
Jon Meow
2022-02-25 08:29:39 -08:00
committed by GitHub
parent fae7f0d007
commit eecf4a34b3
6 changed files with 17 additions and 11 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "common/check.h"
#include "common/ostream.h"
#include "toolchain/diagnostics/diagnostic_emitter.h"
#include "toolchain/lexer/test_helpers.h"
@@ -20,7 +21,7 @@ class StringLiteralTest : public ::testing::Test {
auto Lex(llvm::StringRef text) -> LexedStringLiteral {
llvm::Optional<LexedStringLiteral> result = LexedStringLiteral::Lex(text);
assert(result);
CHECK(result);
EXPECT_EQ(result->Text(), text);
return *result;
}