[clang-tools-extra] r271321 - [include-fixer] disable path cleaning test for windows and mingw.
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue May 31 12:22:01 PDT 2016
Author: ioeric
Date: Tue May 31 14:22:01 2016
New Revision: 271321
URL: http://llvm.org/viewvc/llvm-project?rev=271321&view=rev
Log:
[include-fixer] disable path cleaning test for windows and mingw.
Modified:
clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
Modified: clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp?rev=271321&r1=271320&r2=271321&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp Tue May 31 14:22:01 2016
@@ -90,8 +90,13 @@ public:
InMemoryFileSystem->addFile(HeaderName, 0,
llvm::MemoryBuffer::getMemBuffer(Code));
+ std::string Content = "#include\"" + std::string(HeaderName) +
+ "\"\n"
+ "#include \"internal/internal.h\"";
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
// Test path cleaning for both decls and macros.
const std::string DirtyHeader = "./internal/../internal/./a/b.h";
+ Content += "\n#include \"" + DirtyHeader + "\"";
const std::string CleanHeader = "internal/a/b.h";
const std::string DirtyHeaderContent =
"#define INTERNAL 1\nclass ExtraInternal {};";
@@ -101,17 +106,15 @@ public:
CleanHeader, 1, {});
SymbolInfo DirtySymbol("ExtraInternal", SymbolInfo::SymbolKind::Class,
CleanHeader, 2, {});
-
- std::string Content = "#include\"" + std::string(HeaderName) +
- "\"\n"
- "#include \"internal/internal.h\"\n"
- "#include \"" + DirtyHeader + "\"";
+#endif // _MSC_VER && __MINGW32__
InMemoryFileSystem->addFile(FileName, 0,
llvm::MemoryBuffer::getMemBuffer(Content));
Invocation.run();
EXPECT_TRUE(hasSymbol(InternalSymbol));
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
EXPECT_TRUE(hasSymbol(DirtySymbol));
EXPECT_TRUE(hasSymbol(DirtyMacro));
+#endif // _MSC_VER && __MINGW32__
return true;
}
More information about the cfe-commits
mailing list