llvm-project/lldb/unittests/Utility
Greg Clayton 86188d8a40 Fix PathMappingList for relative and empty paths after recent FileSpec normalization changes
PathMappingList was broken for relative and empty paths after normalization changes in FileSpec. There were also no tests for PathMappingList so I added those.

Changes include:

Change PathMappingList::ReverseRemapPath() to take FileSpec objects instead of ConstString. The only client of this was doing work to convert to and from ConstString objects for no reason.
Normalize all paths prefix and replacements that are added to the PathMappingList vector so they match the paths that have been already normalized in the debug info
Unify code in the two forms of PathMappingList::RemapPath() so only one contains the actual functionality. Prior to this, there were two versions of this code.
Use FileSpec::AppendPathComponent() and remove a long standing TODO so paths are correctly appended to each other.
Added tests for absolute, relative and empty paths.

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

llvm-svn: 332842
2018-05-21 14:14:36 +00:00
..
Inputs Move StructuredData from Core to Utility 2017-06-27 10:45:31 +00:00
ArchSpecTest.cpp [ArchSpec] Add a unittest to complement the change in r321856. 2018-01-05 18:00:44 +00:00
ArgsTest.cpp Move Args.cpp from Interpreter to Utility 2018-04-17 18:53:35 +00:00
CMakeLists.txt Move FileSpecTest to Utility 2018-04-20 08:27:27 +00:00
CleanUpTest.cpp [Utility] Simplify and generalize the CleanUp helper, NFC 2018-02-23 22:08:38 +00:00
ConstStringTest.cpp Remove LIBLLDB_LOG_VERBOSE category 2017-02-05 00:44:54 +00:00
EnvironmentTest.cpp Add Utility/Environment class for handling... environments 2018-01-10 11:57:31 +00:00
FileSpecTest.cpp Fix PathMappingList for relative and empty paths after recent FileSpec normalization changes 2018-05-21 14:14:36 +00:00
JSONTest.cpp Fixup for r311483: Use correct path to StreamString.h 2017-08-22 19:09:39 +00:00
LogTest.cpp [lit] Fix several tests that fail when using Python 3 or on Windows 2018-05-14 21:04:24 +00:00
NameMatchesTest.cpp Fix a couple of corner cases in NameMatches 2017-02-20 11:35:33 +00:00
StatusTest.cpp Add llvm::Error assignment operator to Status class 2017-06-15 11:23:26 +00:00
StringExtractorTest.cpp unittests: Specify types in a bunch of unittest EXPECT's 2016-10-17 18:22:03 +00:00
StructuredDataTest.cpp cmake + xcode: prevent gtests from using includes from project root 2017-10-03 21:20:18 +00:00
TildeExpressionResolverTest.cpp cmake + xcode: prevent gtests from using includes from project root 2017-10-03 21:20:18 +00:00
TimeoutTest.cpp Add a format_provider for the Timeout class 2017-02-10 11:49:33 +00:00
TimerTest.cpp Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
UriParserTest.cpp UriParser cleanup 2017-02-10 12:21:22 +00:00
VASprintfTest.cpp Fix VASprintfTest.cpp for Darwin, add checks 2017-08-09 17:27:02 +00:00