Fix merge conflict
Change-Id: Idd941099241e9310fea13932c3ef4fcf5083730a Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22441 Reviewed-by: dan sinclair <dsinclair@google.com>
This commit is contained in:
parent
dadd149d9b
commit
e2be489756
|
@ -104,10 +104,10 @@ TEST_F(BuilderTest, Switch_WithCase) {
|
||||||
selector_2.push_back(std::make_unique<ast::IntLiteral>(&i32, 2));
|
selector_2.push_back(std::make_unique<ast::IntLiteral>(&i32, 2));
|
||||||
|
|
||||||
ast::CaseStatementList cases;
|
ast::CaseStatementList cases;
|
||||||
cases.push_back(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_1),
|
||||||
std::make_unique<ast::CaseStatement>(std::move(selector_1), std::move(case_1_body)));
|
std::move(case_1_body)));
|
||||||
cases.push_back(std::make_unique<ast::CaseStatement>(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_2),
|
||||||
std::move(selector_2), std::move(case_2_body)));
|
std::move(case_2_body)));
|
||||||
|
|
||||||
ast::SwitchStatement expr(std::make_unique<ast::IdentifierExpression>("a"),
|
ast::SwitchStatement expr(std::make_unique<ast::IdentifierExpression>("a"),
|
||||||
std::move(cases));
|
std::move(cases));
|
||||||
|
@ -265,10 +265,10 @@ TEST_F(BuilderTest, Switch_WithCaseAndDefault) {
|
||||||
selector_2.push_back(std::make_unique<ast::IntLiteral>(&i32, 3));
|
selector_2.push_back(std::make_unique<ast::IntLiteral>(&i32, 3));
|
||||||
|
|
||||||
ast::CaseStatementList cases;
|
ast::CaseStatementList cases;
|
||||||
cases.push_back(std::make_unique<ast::CaseStatement>(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_1),
|
||||||
std::move(selector_1), std::move(case_1_body)));
|
std::move(case_1_body)));
|
||||||
cases.push_back(std::make_unique<ast::CaseStatement>(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_2),
|
||||||
std::move(selector_2), std::move(case_2_body)));
|
std::move(case_2_body)));
|
||||||
cases.push_back(
|
cases.push_back(
|
||||||
std::make_unique<ast::CaseStatement>(std::move(default_body)));
|
std::make_unique<ast::CaseStatement>(std::move(default_body)));
|
||||||
|
|
||||||
|
@ -359,11 +359,17 @@ TEST_F(BuilderTest, Switch_CaseWithFallthrough) {
|
||||||
std::make_unique<ast::ScalarConstructorExpression>(
|
std::make_unique<ast::ScalarConstructorExpression>(
|
||||||
std::make_unique<ast::IntLiteral>(&i32, 3))));
|
std::make_unique<ast::IntLiteral>(&i32, 3))));
|
||||||
|
|
||||||
|
ast::CaseSelectorList selector_1;
|
||||||
|
selector_1.push_back(std::make_unique<ast::IntLiteral>(&i32, 1));
|
||||||
|
|
||||||
|
ast::CaseSelectorList selector_2;
|
||||||
|
selector_2.push_back(std::make_unique<ast::IntLiteral>(&i32, 2));
|
||||||
|
|
||||||
ast::CaseStatementList cases;
|
ast::CaseStatementList cases;
|
||||||
cases.push_back(std::make_unique<ast::CaseStatement>(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_1),
|
||||||
std::make_unique<ast::IntLiteral>(&i32, 1), std::move(case_1_body)));
|
std::move(case_1_body)));
|
||||||
cases.push_back(std::make_unique<ast::CaseStatement>(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_2),
|
||||||
std::make_unique<ast::IntLiteral>(&i32, 2), std::move(case_2_body)));
|
std::move(case_2_body)));
|
||||||
cases.push_back(
|
cases.push_back(
|
||||||
std::make_unique<ast::CaseStatement>(std::move(default_body)));
|
std::make_unique<ast::CaseStatement>(std::move(default_body)));
|
||||||
|
|
||||||
|
@ -438,9 +444,12 @@ TEST_F(BuilderTest, Switch_CaseFallthroughLastStatement) {
|
||||||
std::make_unique<ast::IntLiteral>(&i32, 1))));
|
std::make_unique<ast::IntLiteral>(&i32, 1))));
|
||||||
case_1_body.push_back(std::make_unique<ast::FallthroughStatement>());
|
case_1_body.push_back(std::make_unique<ast::FallthroughStatement>());
|
||||||
|
|
||||||
|
ast::CaseSelectorList selector_1;
|
||||||
|
selector_1.push_back(std::make_unique<ast::IntLiteral>(&i32, 1));
|
||||||
|
|
||||||
ast::CaseStatementList cases;
|
ast::CaseStatementList cases;
|
||||||
cases.push_back(std::make_unique<ast::CaseStatement>(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_1),
|
||||||
std::make_unique<ast::IntLiteral>(&i32, 1), std::move(case_1_body)));
|
std::move(case_1_body)));
|
||||||
|
|
||||||
ast::SwitchStatement expr(std::make_unique<ast::IdentifierExpression>("a"),
|
ast::SwitchStatement expr(std::make_unique<ast::IdentifierExpression>("a"),
|
||||||
std::move(cases));
|
std::move(cases));
|
||||||
|
@ -508,8 +517,8 @@ TEST_F(BuilderTest, Switch_WithNestedBreak) {
|
||||||
selector_1.push_back(std::make_unique<ast::IntLiteral>(&i32, 1));
|
selector_1.push_back(std::make_unique<ast::IntLiteral>(&i32, 1));
|
||||||
|
|
||||||
ast::CaseStatementList cases;
|
ast::CaseStatementList cases;
|
||||||
cases.push_back(std::make_unique<ast::CaseStatement>(
|
cases.push_back(std::make_unique<ast::CaseStatement>(std::move(selector_1),
|
||||||
std::move(selector_1), std::move(case_1_body)));
|
std::move(case_1_body)));
|
||||||
|
|
||||||
ast::SwitchStatement expr(std::make_unique<ast::IdentifierExpression>("a"),
|
ast::SwitchStatement expr(std::make_unique<ast::IdentifierExpression>("a"),
|
||||||
std::move(cases));
|
std::move(cases));
|
||||||
|
|
Loading…
Reference in New Issue