llvm-project/clang/unittests
Petr Pavlu b25187adfb [libclang] Fix LibclangReparseTest.FileName when TMPDIR is set to a symlink
Fix testing of clang_File_tryGetRealPathName() in
LibclangReparseTest.FileName when executing in an environment which has
TMPDIR set to a symbolic link that points to an actual directory. The
test would fail because the name returned by
clang_File_tryGetRealPathName() has the symlink resolved but the test
compared it to the original filename of a temporary file.

The patch addresses the problem by checking only that the value returned
by clang_File_tryGetRealPathName() ends with "main.cpp".

Additionally, the patch makes the previous assertion in the test that
checks result of clang_getFileName() stricter. It newly verifies that
the name returned by the function is exactly same as what was given to
clang_parseTranslationUnit()/clang_getFile().

Differential Revision: https://reviews.llvm.org/D45807

llvm-svn: 330507
2018-04-21 14:35:18 +00:00
..
AST [ASTImporter] Add test helper Fixture 2018-03-30 22:03:29 +00:00
ASTMatchers [ASTMatchers] Introduce a matcher for matching any given Objective-C selector 2018-03-29 00:51:12 +00:00
Analysis [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Basic Fixes errors with FS iterators caused by https://reviews.llvm.org/D44960 2018-04-04 19:47:25 +00:00
CodeGen Unit tests for TBAA metadata generation. 2017-12-22 15:22:45 +00:00
CrossTU Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>" 2018-02-27 15:54:55 +00:00
Driver Add a unit test for Driver::getDefaultModuleCachePath(). 2018-02-12 17:59:54 +00:00
Format [clang-format] Don't remove empty lines before namespace endings 2018-04-19 13:02:15 +00:00
Frontend Add possibility to specify output stream for CompilerInstance 2018-03-02 12:11:40 +00:00
Lex [Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch. 2018-01-29 13:21:23 +00:00
Rename Unittests misc. typos 2018-02-06 13:12:29 +00:00
Rewrite [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Sema Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>" 2018-02-27 15:54:55 +00:00
StaticAnalyzer Unittests misc. typos 2018-02-06 13:12:29 +00:00
Tooling [UnitTests] NFC/build-perf: Break up nontrivial compile jobs 2018-04-19 18:19:02 +00:00
libclang [libclang] Fix LibclangReparseTest.FileName when TMPDIR is set to a symlink 2018-04-21 14:35:18 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00