forked from qt-creator/qt-creator
Clang: Use " instead of <> for includes
Change-Id: Ife6ab8b89221dc336b93c1dba3804ba240c3e52e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -275,9 +275,9 @@ Utils::SmallString PchCreator::generatePchIncludeFileContent(
|
|||||||
fileContent.reserve(includes.size() * lineTemplateSize + contentSize(includes));
|
fileContent.reserve(includes.size() * lineTemplateSize + contentSize(includes));
|
||||||
|
|
||||||
for (const Utils::SmallString &include : includes) {
|
for (const Utils::SmallString &include : includes) {
|
||||||
fileContent += "#include <";
|
fileContent += "#include \"";
|
||||||
fileContent += include;
|
fileContent += include;
|
||||||
fileContent += ">\n";
|
fileContent += "\"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return fileContent;
|
return fileContent;
|
||||||
|
@@ -141,7 +141,7 @@ TEST_F(PchCreatorVerySlowTest, CreateGlobalPchFileContent)
|
|||||||
{
|
{
|
||||||
auto content = creator.generateGlobalPchHeaderFileContent();
|
auto content = creator.generateGlobalPchHeaderFileContent();
|
||||||
|
|
||||||
ASSERT_THAT(content, "#include <" TESTDATA_DIR "/includecollector_external3.h>\n#include <" TESTDATA_DIR "/includecollector_external1.h>\n#include <" TESTDATA_DIR "/includecollector_external2.h>\n");
|
ASSERT_THAT(content, "#include \"" TESTDATA_DIR "/includecollector_external3.h\"\n#include \"" TESTDATA_DIR "/includecollector_external1.h\"\n#include \"" TESTDATA_DIR "/includecollector_external2.h\"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PchCreatorVerySlowTest, CreateGlobalPchHeaderFile)
|
TEST_F(PchCreatorVerySlowTest, CreateGlobalPchHeaderFile)
|
||||||
@@ -151,7 +151,7 @@ TEST_F(PchCreatorVerySlowTest, CreateGlobalPchHeaderFile)
|
|||||||
|
|
||||||
auto content = file->readAll();
|
auto content = file->readAll();
|
||||||
|
|
||||||
ASSERT_THAT(content, "#include <" TESTDATA_DIR "/includecollector_external3.h>\n#include <" TESTDATA_DIR "/includecollector_external1.h>\n#include <" TESTDATA_DIR "/includecollector_external2.h>\n");
|
ASSERT_THAT(content, "#include \"" TESTDATA_DIR "/includecollector_external3.h\"\n#include \"" TESTDATA_DIR "/includecollector_external1.h\"\n#include \"" TESTDATA_DIR "/includecollector_external2.h\"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PchCreator, ConvertToQStringList)
|
TEST_F(PchCreator, ConvertToQStringList)
|
||||||
@@ -214,7 +214,7 @@ TEST_F(PchCreatorSlowTest, CreateProjectPartPchFileContent)
|
|||||||
|
|
||||||
auto content = creator.generatePchIncludeFileContent(includes);
|
auto content = creator.generatePchIncludeFileContent(includes);
|
||||||
|
|
||||||
ASSERT_THAT(content, "#include <" TESTDATA_DIR "/includecollector_header2.h>\n#include <" TESTDATA_DIR "/includecollector_external1.h>\n#include <" TESTDATA_DIR "/includecollector_external2.h>\n");
|
ASSERT_THAT(content, "#include \"" TESTDATA_DIR "/includecollector_header2.h\"\n#include \"" TESTDATA_DIR "/includecollector_external1.h\"\n#include \"" TESTDATA_DIR "/includecollector_external2.h\"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PchCreatorSlowTest, CreateProjectPartPchIncludeFile)
|
TEST_F(PchCreatorSlowTest, CreateProjectPartPchIncludeFile)
|
||||||
@@ -227,7 +227,7 @@ TEST_F(PchCreatorSlowTest, CreateProjectPartPchIncludeFile)
|
|||||||
|
|
||||||
auto fileContent = file->readAll();
|
auto fileContent = file->readAll();
|
||||||
|
|
||||||
ASSERT_THAT(fileContent, "#include <" TESTDATA_DIR "/includecollector_header2.h>\n#include <" TESTDATA_DIR "/includecollector_external1.h>\n#include <" TESTDATA_DIR "/includecollector_external2.h>\n");
|
ASSERT_THAT(fileContent, "#include \"" TESTDATA_DIR "/includecollector_header2.h\"\n#include \"" TESTDATA_DIR "/includecollector_external1.h\"\n#include \"" TESTDATA_DIR "/includecollector_external2.h\"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PchCreator, CreateProjectPartPchCompilerArguments)
|
TEST_F(PchCreator, CreateProjectPartPchCompilerArguments)
|
||||||
|
Reference in New Issue
Block a user