diff options
-rw-r--r-- | clang/unittests/AST/OMPStructuredBlockTest.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/unittests/AST/OMPStructuredBlockTest.cpp b/clang/unittests/AST/OMPStructuredBlockTest.cpp index 623bed388c0..f4a3fad4a1b 100644 --- a/clang/unittests/AST/OMPStructuredBlockTest.cpp +++ b/clang/unittests/AST/OMPStructuredBlockTest.cpp @@ -102,11 +102,12 @@ void test() { #pragma omp cancel parallel } })"; - ASSERT_TRUE( - PrintedOMPStmtMatches(Source, OMPInnermostStructuredBlockMatcher(), R"({ + const char *Expected = R"({ #pragma omp cancel parallel } -)")); +)"; + ASSERT_TRUE(PrintedOMPStmtMatches( + Source, OMPInnermostStructuredBlockMatcher(), Expected)); ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(), "#pragma omp cancel parallel\n")); } @@ -117,14 +118,15 @@ TEST(OMPStructuredBlock, TestCancellationPoint) { void test() { #pragma omp parallel { -#pragma omp cancellation point parallel + #pragma omp cancellation point parallel } })"; - ASSERT_TRUE( - PrintedOMPStmtMatches(Source, OMPInnermostStructuredBlockMatcher(), R"({ + const char *Expected = R"({ #pragma omp cancellation point parallel } -)")); +)"; + ASSERT_TRUE(PrintedOMPStmtMatches( + Source, OMPInnermostStructuredBlockMatcher(), Expected)); ASSERT_TRUE( PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(), "#pragma omp cancellation point parallel\n")); |