r356749 - [AST] OMPStructuredBlockTest: avoid using multiline string literals in macros
Roman Lebedev via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 22 06:40:36 PDT 2019
Author: lebedevri
Date: Fri Mar 22 06:40:36 2019
New Revision: 356749
URL: http://llvm.org/viewvc/llvm-project?rev=356749&view=rev
Log:
[AST] OMPStructuredBlockTest: avoid using multiline string literals in macros
That is what i have been doing elsewhere in these tests, maybe that's it?
Maybe this helps with failing builds:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/17921
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-global-isel/builds/10248
Modified:
cfe/trunk/unittests/AST/OMPStructuredBlockTest.cpp
Modified: cfe/trunk/unittests/AST/OMPStructuredBlockTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/OMPStructuredBlockTest.cpp?rev=356749&r1=356748&r2=356749&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/OMPStructuredBlockTest.cpp (original)
+++ cfe/trunk/unittests/AST/OMPStructuredBlockTest.cpp Fri Mar 22 06:40:36 2019
@@ -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, TestCancellatio
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"));
More information about the cfe-commits
mailing list