summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2017-02-02 16:54:47 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-02-14 13:48:17 +0000
commit5094cfe0194f0540ef622312e450c9acd793ee9b (patch)
tree56c3ea26e4e3501b2dced61c7a3e1d2578010d23 /tests/unit
parente06030d56fcfa20d0180d756639a952c5f7cffca (diff)
downloadqt-creator-5094cfe0194f0540ef622312e450c9acd793ee9b.tar.gz
UnitTest: Replace "included File" with "header"
Change-Id: I30799e116a794e041c833d76c6cd969ba1a428bf Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/unittest/clangdiagnosticfilter-test.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/unit/unittest/clangdiagnosticfilter-test.cpp b/tests/unit/unittest/clangdiagnosticfilter-test.cpp
index a8d3c2f175..502e2538fc 100644
--- a/tests/unit/unittest/clangdiagnosticfilter-test.cpp
+++ b/tests/unit/unittest/clangdiagnosticfilter-test.cpp
@@ -63,22 +63,22 @@ DiagnosticContainer createDiagnostic(const QString &text,
const QString mainFileHeaderPath = QString::fromUtf8(TESTDATA_DIR "/someHeader.h");
const QString mainFilePath = QString::fromUtf8(TESTDATA_DIR "/diagnostic_erroneous_source.cpp");
-const QString includedFilePath = QString::fromUtf8(TESTDATA_DIR "/diagnostic_erroneous_header.cpp");
+const QString headerFilePath = QString::fromUtf8(TESTDATA_DIR "/diagnostic_erroneous_header.cpp");
-DiagnosticContainer warningFromIncludedFile()
+DiagnosticContainer warningFromHeader()
{
return createDiagnostic(
QStringLiteral("warning: control reaches end of non-void function"),
ClangBackEnd::DiagnosticSeverity::Warning,
- includedFilePath);
+ headerFilePath);
}
-DiagnosticContainer errorFromIncludedFile()
+DiagnosticContainer errorFromHeader()
{
return createDiagnostic(
QStringLiteral("C++ requires a type specifier for all declarations"),
ClangBackEnd::DiagnosticSeverity::Error,
- includedFilePath);
+ headerFilePath);
}
DiagnosticContainer warningFromMainFile()
@@ -144,9 +144,9 @@ DiagnosticContainer warningFromMainFileWithFixits()
return createDiagnosticWithFixIt(mainFilePath);
}
-DiagnosticContainer warningFromIncludedFileWithFixits()
+DiagnosticContainer warningFromHeaderFileWithFixits()
{
- return createDiagnosticWithFixIt(includedFilePath);
+ return createDiagnosticWithFixIt(headerFilePath);
}
class ClangDiagnosticFilter : public ::testing::Test
@@ -162,11 +162,11 @@ TEST_F(ClangDiagnosticFilter, WarningsFromMainFileAreLetThrough)
ASSERT_THAT(clangDiagnosticFilter.takeWarnings(),Contains(warningFromMainFile()));
}
-TEST_F(ClangDiagnosticFilter, WarningsFromIncludedFileAreIgnored)
+TEST_F(ClangDiagnosticFilter, WarningsFromHeaderAreIgnored)
{
- clangDiagnosticFilter.filter({warningFromIncludedFile()});
+ clangDiagnosticFilter.filter({warningFromHeader()});
- ASSERT_THAT(clangDiagnosticFilter.takeWarnings(), Not(Contains(warningFromIncludedFile())));
+ ASSERT_THAT(clangDiagnosticFilter.takeWarnings(), Not(Contains(warningFromHeader())));
}
TEST_F(ClangDiagnosticFilter, ErrorsFromMainFileAreLetThrough)
@@ -176,11 +176,11 @@ TEST_F(ClangDiagnosticFilter, ErrorsFromMainFileAreLetThrough)
ASSERT_THAT(clangDiagnosticFilter.takeErrors(), Contains(errorFromMainFile()));
}
-TEST_F(ClangDiagnosticFilter, ErrorsFromIncludedFileAreIgnored)
+TEST_F(ClangDiagnosticFilter, ErrorsFromHeaderAreIgnored)
{
- clangDiagnosticFilter.filter({errorFromIncludedFile()});
+ clangDiagnosticFilter.filter({errorFromHeader()});
- ASSERT_THAT(clangDiagnosticFilter.takeErrors(), Not(Contains(errorFromIncludedFile())));
+ ASSERT_THAT(clangDiagnosticFilter.takeErrors(), Not(Contains(errorFromHeader())));
}
TEST_F(ClangDiagnosticFilter, FixItsFromMainFileAreLetThrough)
@@ -190,12 +190,12 @@ TEST_F(ClangDiagnosticFilter, FixItsFromMainFileAreLetThrough)
ASSERT_THAT(clangDiagnosticFilter.takeFixIts(), Contains(warningFromMainFileWithFixits()));
}
-TEST_F(ClangDiagnosticFilter, FixItsFromIncludedFileAreIgnored)
+TEST_F(ClangDiagnosticFilter, FixItsFromHeaderAreIgnored)
{
- clangDiagnosticFilter.filter({warningFromIncludedFileWithFixits()});
+ clangDiagnosticFilter.filter({warningFromHeaderFileWithFixits()});
ASSERT_THAT(clangDiagnosticFilter.takeFixIts(),
- Not(Contains(warningFromIncludedFileWithFixits())));
+ Not(Contains(warningFromHeaderFileWithFixits())));
}
TEST_F(ClangDiagnosticFilter, WarningsAreEmptyAfterTaking)