Skip to content

Commit fbb6bf4

Browse files
committed
small fixes
1 parent 382b7b5 commit fbb6bf4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

server/src/Paths.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace Paths {
1717
extern fs::path logPath;
1818
const std::string MAKEFILE_EXTENSION = ".mk";
19+
const std::string CXX_EXTENSION = ".cpp";
1920
const std::string TEST_SUFFIX = "_test";
2021
const std::string STUB_SUFFIX = "_stub";
2122
const std::string DOT_SEP = "_dot_";

server/src/Tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ void KTestObjectParser::assignTypeUnnamedVar(
658658
continue;
659659
}
660660
if (!visited[indObj]) {
661-
Tests::MethodParam param = {fieldType.baseTypeObj(1), "", std::nullopt };
661+
Tests::MethodParam param = {fieldType.baseTypeObj(1), "", std::nullopt};
662662
order.emplace(indObj, param, curType.paramValue);
663663
visited[indObj] = true;
664664
}

server/src/coverage/TestRunner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ std::vector<UnitTest> TestRunner::getTestsToLaunch() {
9090
return;
9191
}
9292
const auto &testFilePath = directoryEntry.path();
93-
if (testFilePath.extension() == ".cpp" && StringUtils::endsWith(testFilePath.stem().c_str(), Paths::TEST_SUFFIX)) {
93+
if (testFilePath.extension() == Paths::CXX_EXTENSION &&
94+
StringUtils::endsWith(testFilePath.stem().c_str(), Paths::TEST_SUFFIX)) {
9495
fs::path sourcePath = Paths::testPathToSourcePath(projectContext, testFilePath);
9596
fs::path makefile =
96-
Paths::getMakefilePathFromSourceFilePath(projectContext, sourcePath);
97+
Paths::getMakefilePathFromSourceFilePath(projectContext, sourcePath);
9798
if (fs::exists(makefile)) {
9899
try {
99100
auto tests = getTestsFromMakefile(makefile, testFilePath);

0 commit comments

Comments
 (0)