test: removed absolute filepaths from test output of recorded references

This commit is contained in:
mlangkabel
2018-02-06 15:09:39 +01:00
parent f0b817eb0a
commit adb9542c31
57 changed files with 1053 additions and 1039 deletions
+15 -1
View File
@@ -44,6 +44,19 @@ public:
ReferenceKind referenceKind, const NameHierarchy& referencedName, const NameHierarchy& contextName,
const ParseLocation& location) override
{
std::wstring referencedNameString = referencedName.getQualifiedNameWithSignature();
try
{
if (FilePath(referencedNameString).exists())
{
referencedNameString = FilePath(referencedNameString).wFileName();
}
}
catch (const boost::filesystem::filesystem_error& e)
{
// do nothing and use the old contectNameString
}
std::wstring contextNameString = contextName.getQualifiedNameWithSignature();
try
{
@@ -56,7 +69,8 @@ public:
{
// do nothing and use the old contectNameString
}
recordLine(referenceKindToString(referenceKind) + L" " + addLocationSuffix(contextNameString + L" -> " + referencedName.getQualifiedNameWithSignature() + L" [" + location.filePath.wFileName(), location) + L"]\n");
recordLine(referenceKindToString(referenceKind) + L" " + addLocationSuffix(contextNameString + L" -> " + referencedNameString + L" [" + location.filePath.wFileName(), location) + L"]\n");
}
void recordQualifierLocation(const NameHierarchy& qualifierName, const ParseLocation& location) override