Run clang-format over these inputs with the correct style configuration. (#278)

This commit is contained in:
Chandler Carruth
2021-02-22 17:16:27 -08:00
committed by GitHub
parent 50fa120c87
commit b302c50013
2 changed files with 40 additions and 47 deletions
+22 -21
View File
@@ -155,11 +155,11 @@ TEST_F(LexerTest, ValidatesBaseSpecifier) {
auto buffer = Lex(literal);
EXPECT_FALSE(buffer.HasErrors()) << literal;
ASSERT_THAT(buffer, HasTokens(llvm::ArrayRef<ExpectedToken>{
{.kind = TokenKind::IntegerLiteral(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
{.kind = TokenKind::IntegerLiteral(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
}
llvm::StringLiteral invalid[] = {
@@ -170,12 +170,13 @@ TEST_F(LexerTest, ValidatesBaseSpecifier) {
for (llvm::StringLiteral literal : invalid) {
auto buffer = Lex(literal);
EXPECT_TRUE(buffer.HasErrors()) << literal;
ASSERT_THAT(buffer, HasTokens(llvm::ArrayRef<ExpectedToken>{
{.kind = TokenKind::Error(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
ASSERT_THAT(
buffer,
HasTokens(llvm::ArrayRef<ExpectedToken>{{.kind = TokenKind::Error(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
}
}
@@ -199,11 +200,11 @@ TEST_F(LexerTest, ValidatesIntegerDigitSeparators) {
auto buffer = Lex(literal);
EXPECT_FALSE(buffer.HasErrors()) << literal;
ASSERT_THAT(buffer, HasTokens(llvm::ArrayRef<ExpectedToken>{
{.kind = TokenKind::IntegerLiteral(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
{.kind = TokenKind::IntegerLiteral(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
}
llvm::StringLiteral invalid[] = {
@@ -233,11 +234,11 @@ TEST_F(LexerTest, ValidatesIntegerDigitSeparators) {
// We expect to produce a token even for a literal containing invalid digit
// separators, for better error recovery.
ASSERT_THAT(buffer, HasTokens(llvm::ArrayRef<ExpectedToken>{
{.kind = TokenKind::IntegerLiteral(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
{.kind = TokenKind::IntegerLiteral(),
.line = 1,
.column = 1,
.indent_column = 1,
.text = literal}}));
}
}