Consistent formatting for Dawn/Tint.
This CL updates the clang format files to have a single shared format
between Dawn and Tint. The major changes are tabs are 4 spaces, lines
are 100 columns and namespaces are not indented.
Bug: dawn:1339
Change-Id: I4208742c95643998d9fd14e77a9cc558071ded39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87603
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/ast/compound_assignment_statement_test.cc b/src/tint/ast/compound_assignment_statement_test.cc
index 080f93e..47e7201 100644
--- a/src/tint/ast/compound_assignment_statement_test.cc
+++ b/src/tint/ast/compound_assignment_statement_test.cc
@@ -23,77 +23,72 @@
using CompoundAssignmentStatementTest = TestHelper;
TEST_F(CompoundAssignmentStatementTest, Creation) {
- auto* lhs = Expr("lhs");
- auto* rhs = Expr("rhs");
- auto op = BinaryOp::kAdd;
+ auto* lhs = Expr("lhs");
+ auto* rhs = Expr("rhs");
+ auto op = BinaryOp::kAdd;
- auto* stmt = create<CompoundAssignmentStatement>(lhs, rhs, op);
- EXPECT_EQ(stmt->lhs, lhs);
- EXPECT_EQ(stmt->rhs, rhs);
- EXPECT_EQ(stmt->op, op);
+ auto* stmt = create<CompoundAssignmentStatement>(lhs, rhs, op);
+ EXPECT_EQ(stmt->lhs, lhs);
+ EXPECT_EQ(stmt->rhs, rhs);
+ EXPECT_EQ(stmt->op, op);
}
TEST_F(CompoundAssignmentStatementTest, CreationWithSource) {
- auto* lhs = Expr("lhs");
- auto* rhs = Expr("rhs");
- auto op = BinaryOp::kMultiply;
+ auto* lhs = Expr("lhs");
+ auto* rhs = Expr("rhs");
+ auto op = BinaryOp::kMultiply;
- auto* stmt = create<CompoundAssignmentStatement>(
- Source{Source::Location{20, 2}}, lhs, rhs, op);
- auto src = stmt->source;
- EXPECT_EQ(src.range.begin.line, 20u);
- EXPECT_EQ(src.range.begin.column, 2u);
+ auto* stmt = create<CompoundAssignmentStatement>(Source{Source::Location{20, 2}}, lhs, rhs, op);
+ auto src = stmt->source;
+ EXPECT_EQ(src.range.begin.line, 20u);
+ EXPECT_EQ(src.range.begin.column, 2u);
}
TEST_F(CompoundAssignmentStatementTest, IsCompoundAssign) {
- auto* lhs = Expr("lhs");
- auto* rhs = Expr("rhs");
- auto op = BinaryOp::kSubtract;
+ auto* lhs = Expr("lhs");
+ auto* rhs = Expr("rhs");
+ auto op = BinaryOp::kSubtract;
- auto* stmt = create<CompoundAssignmentStatement>(lhs, rhs, op);
- EXPECT_TRUE(stmt->Is<CompoundAssignmentStatement>());
+ auto* stmt = create<CompoundAssignmentStatement>(lhs, rhs, op);
+ EXPECT_TRUE(stmt->Is<CompoundAssignmentStatement>());
}
TEST_F(CompoundAssignmentStatementTest, Assert_Null_LHS) {
- EXPECT_FATAL_FAILURE(
- {
- ProgramBuilder b;
- b.create<CompoundAssignmentStatement>(nullptr, b.Expr(1),
- BinaryOp::kAdd);
- },
- "internal compiler error");
+ EXPECT_FATAL_FAILURE(
+ {
+ ProgramBuilder b;
+ b.create<CompoundAssignmentStatement>(nullptr, b.Expr(1), BinaryOp::kAdd);
+ },
+ "internal compiler error");
}
TEST_F(CompoundAssignmentStatementTest, Assert_Null_RHS) {
- EXPECT_FATAL_FAILURE(
- {
- ProgramBuilder b;
- b.create<CompoundAssignmentStatement>(b.Expr(1), nullptr,
- BinaryOp::kAdd);
- },
- "internal compiler error");
+ EXPECT_FATAL_FAILURE(
+ {
+ ProgramBuilder b;
+ b.create<CompoundAssignmentStatement>(b.Expr(1), nullptr, BinaryOp::kAdd);
+ },
+ "internal compiler error");
}
TEST_F(CompoundAssignmentStatementTest, Assert_DifferentProgramID_LHS) {
- EXPECT_FATAL_FAILURE(
- {
- ProgramBuilder b1;
- ProgramBuilder b2;
- b1.create<CompoundAssignmentStatement>(b2.Expr("lhs"), b1.Expr("rhs"),
- BinaryOp::kAdd);
- },
- "internal compiler error");
+ EXPECT_FATAL_FAILURE(
+ {
+ ProgramBuilder b1;
+ ProgramBuilder b2;
+ b1.create<CompoundAssignmentStatement>(b2.Expr("lhs"), b1.Expr("rhs"), BinaryOp::kAdd);
+ },
+ "internal compiler error");
}
TEST_F(CompoundAssignmentStatementTest, Assert_DifferentProgramID_RHS) {
- EXPECT_FATAL_FAILURE(
- {
- ProgramBuilder b1;
- ProgramBuilder b2;
- b1.create<CompoundAssignmentStatement>(b1.Expr("lhs"), b2.Expr("rhs"),
- BinaryOp::kAdd);
- },
- "internal compiler error");
+ EXPECT_FATAL_FAILURE(
+ {
+ ProgramBuilder b1;
+ ProgramBuilder b2;
+ b1.create<CompoundAssignmentStatement>(b1.Expr("lhs"), b2.Expr("rhs"), BinaryOp::kAdd);
+ },
+ "internal compiler error");
}
} // namespace