@@ -1519,24 +1519,10 @@ TEST_P(ASTMatchersTest, SwitchCase_MatchesSwitch) {
15191519}
15201520
15211521TEST (PatternMatching, MatchesInspect) {
1522- EXPECT_TRUE (matchesConditionally (" void x() { inspect(42) { __:; } }" , inspectExpr (), true , " -fpattern-matching" ));
1523- EXPECT_TRUE (matchesConditionally (" void x() { inspect(42) { 42:; } }" , inspectExpr (), true , " -fpattern-matching" ));
1524- EXPECT_TRUE (matchesConditionally (" void x() { int y=0; inspect(42) { y:; } }" , inspectExpr (), true , " -fpattern-matching" ));
1522+ EXPECT_TRUE (matchesConditionally (" void x() { inspect(42) { __ => {} }; }" , inspectExpr (), true , " -fpattern-matching" ));
1523+ EXPECT_TRUE (matchesConditionally (" void x() { inspect(42) { 42 => {} }; }" , inspectExpr (), true , " -fpattern-matching" ));
1524+ EXPECT_TRUE (matchesConditionally (" void x() { int y=0; inspect(42) { y => {} }; }" , inspectExpr (), true , " -fpattern-matching" ));
15251525 EXPECT_TRUE (matchesConditionally (" void x() { }" , inspectExpr (), false , " -fpattern-matching" ));
1526-
1527- EXPECT_TRUE (matchesConditionally (" void x() { struct A{int x;}; A a = {42}; inspect(a) { __:; } }" , inspectExpr (), true , " -fpattern-matching" ));
1528- EXPECT_TRUE (matchesConditionally (" void x() { struct A{int x; bool operator==(const A& other) { return x == other.x; } }; A a = {42}; A b = a; inspect(a) { b:; } }" , inspectExpr (), true , " -fpattern-matching" ));
1529- }
1530-
1531- TEST (PatternMatching, MatchesPattern) {
1532- EXPECT_TRUE (matchesConditionally (" void x() { inspect(42) { __:; } }" , patternStmt (), true , " -fpattern-matching" ));
1533- EXPECT_TRUE (matchesConditionally (" void x() { inspect(42) { 42:; } }" , patternStmt (), true , " -fpattern-matching" ));
1534- EXPECT_TRUE (matchesConditionally (" void x() { int y=0; inspect(42) { y:; } }" , patternStmt (), true , " -fpattern-matching" ));
1535- EXPECT_TRUE (matchesConditionally (" void x() { }" , patternStmt (), false , " -fpattern-matching" ));
1536-
1537-
1538- EXPECT_TRUE (matchesConditionally (" void x() { int a=42; inspect(42) { a if(true):; } }" , patternStmt (), true , " -fpattern-matching" ));
1539- EXPECT_TRUE (matchesConditionally (" void x() { inspect(42) { 42 if(true):; } }" , patternStmt (), true , " -fpattern-matching" ));
15401526}
15411527
15421528TEST_P (ASTMatchersTest, CxxExceptionHandling_SimpleCases) {
0 commit comments