logic: used wstring in FilePath constructor
* used wstring in FilePath constructor where easily possible * added FilePath concatenate method that accepts string parameter * implemented using only wstring in MessageStatus * used wstring in config
This commit is contained in:
@@ -12,7 +12,7 @@ public:
|
||||
{
|
||||
std::vector<IncludeDirective> includeDirectives = IncludeProcessing::getIncludeDirectives(TextAccess::createFromString(
|
||||
"#include \"foo.h\"",
|
||||
FilePath("foo.cpp")
|
||||
FilePath(L"foo.cpp")
|
||||
));
|
||||
|
||||
TS_ASSERT(!includeDirectives.empty());
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
{
|
||||
std::vector<IncludeDirective> includeDirectives = IncludeProcessing::getIncludeDirectives(TextAccess::createFromString(
|
||||
"#include <foo.h>",
|
||||
FilePath("foo.cpp")
|
||||
FilePath(L"foo.cpp")
|
||||
));
|
||||
|
||||
TS_ASSERT(!includeDirectives.empty());
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
{
|
||||
std::vector<IncludeDirective> includeDirectives = IncludeProcessing::getIncludeDirectives(TextAccess::createFromString(
|
||||
"# include \"foo.h\"",
|
||||
FilePath("foo.cpp")
|
||||
FilePath(L"foo.cpp")
|
||||
));
|
||||
|
||||
TS_ASSERT(!includeDirectives.empty());
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
void test_header_search_path_detection_does_not_find_path_relative_to_including_file()
|
||||
{
|
||||
std::vector<FilePath> headerSearchDirectories = utility::toVector(IncludeProcessing::getHeaderSearchDirectories(
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_does_not_find_path_relative_to_including_file/a.cpp") },
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_does_not_find_path_relative_to_including_file") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_does_not_find_path_relative_to_including_file/a.cpp") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_does_not_find_path_relative_to_including_file") },
|
||||
{ },
|
||||
1, [](float) {}
|
||||
));
|
||||
@@ -85,65 +85,65 @@ public:
|
||||
void test_header_search_path_detection_finds_path_inside_sub_directory()
|
||||
{
|
||||
std::vector<FilePath> headerSearchDirectories = utility::toVector(IncludeProcessing::getHeaderSearchDirectories(
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_inside_sub_directory/a.cpp") },
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_inside_sub_directory") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_inside_sub_directory/a.cpp") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_inside_sub_directory") },
|
||||
{},
|
||||
1, [](float) {}
|
||||
));
|
||||
|
||||
TS_ASSERT(utility::containsElement<FilePath>(
|
||||
headerSearchDirectories,
|
||||
FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_inside_sub_directory/include").makeAbsolute()
|
||||
FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_inside_sub_directory/include").makeAbsolute()
|
||||
));
|
||||
}
|
||||
|
||||
void test_header_search_path_detection_finds_path_relative_to_sub_directory()
|
||||
{
|
||||
std::vector<FilePath> headerSearchDirectories = utility::toVector(IncludeProcessing::getHeaderSearchDirectories(
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_relative_to_sub_directory/a.cpp") },
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_relative_to_sub_directory") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_relative_to_sub_directory/a.cpp") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_relative_to_sub_directory") },
|
||||
{},
|
||||
1, [](float) {}
|
||||
));
|
||||
|
||||
TS_ASSERT(utility::containsElement<FilePath>(
|
||||
headerSearchDirectories,
|
||||
FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_relative_to_sub_directory/include").makeAbsolute()
|
||||
FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_relative_to_sub_directory/include").makeAbsolute()
|
||||
));
|
||||
}
|
||||
|
||||
void test_header_search_path_detection_finds_path_included_in_header_search_path()
|
||||
{
|
||||
std::vector<FilePath> headerSearchDirectories = utility::toVector(IncludeProcessing::getHeaderSearchDirectories(
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/a.cpp") },
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/include_b") },
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/include_a") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/a.cpp") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/include_b") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/include_a") },
|
||||
1, [](float) {}
|
||||
));
|
||||
|
||||
|
||||
TS_ASSERT(utility::containsElement<FilePath>(
|
||||
headerSearchDirectories,
|
||||
FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/include_b").makeAbsolute()
|
||||
FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_header_search_path/include_b").makeAbsolute()
|
||||
));
|
||||
}
|
||||
|
||||
void test_header_search_path_detection_finds_path_included_in_future_header_search_path()
|
||||
{
|
||||
std::vector<FilePath> headerSearchDirectories = utility::toVector(IncludeProcessing::getHeaderSearchDirectories(
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path/a.cpp") },
|
||||
{ FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path/a.cpp") },
|
||||
{ FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path") },
|
||||
{ },
|
||||
1, [](float) {}
|
||||
));
|
||||
|
||||
TS_ASSERT(utility::containsElement<FilePath>(
|
||||
headerSearchDirectories,
|
||||
FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path/include_a").makeAbsolute()
|
||||
FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path/include_a").makeAbsolute()
|
||||
));
|
||||
TS_ASSERT(utility::containsElement<FilePath>(
|
||||
headerSearchDirectories,
|
||||
FilePath("data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path/include_b").makeAbsolute()
|
||||
FilePath(L"data/CxxIncludeProcessingTestSuite/test_header_search_path_detection_finds_path_included_in_future_header_search_path/include_b").makeAbsolute()
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user