Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ladisgin committed Jun 19, 2023
1 parent 382b7b5 commit fbb6bf4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions server/src/Paths.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
namespace Paths {
extern fs::path logPath;
const std::string MAKEFILE_EXTENSION = ".mk";
const std::string CXX_EXTENSION = ".cpp";
const std::string TEST_SUFFIX = "_test";
const std::string STUB_SUFFIX = "_stub";
const std::string DOT_SEP = "_dot_";
Expand Down
2 changes: 1 addition & 1 deletion server/src/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ void KTestObjectParser::assignTypeUnnamedVar(
continue;
}
if (!visited[indObj]) {
Tests::MethodParam param = {fieldType.baseTypeObj(1), "", std::nullopt };
Tests::MethodParam param = {fieldType.baseTypeObj(1), "", std::nullopt};
order.emplace(indObj, param, curType.paramValue);
visited[indObj] = true;
}
Expand Down
5 changes: 3 additions & 2 deletions server/src/coverage/TestRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ std::vector<UnitTest> TestRunner::getTestsToLaunch() {
return;
}
const auto &testFilePath = directoryEntry.path();
if (testFilePath.extension() == ".cpp" && StringUtils::endsWith(testFilePath.stem().c_str(), Paths::TEST_SUFFIX)) {
if (testFilePath.extension() == Paths::CXX_EXTENSION &&
StringUtils::endsWith(testFilePath.stem().c_str(), Paths::TEST_SUFFIX)) {
fs::path sourcePath = Paths::testPathToSourcePath(projectContext, testFilePath);
fs::path makefile =
Paths::getMakefilePathFromSourceFilePath(projectContext, sourcePath);
Paths::getMakefilePathFromSourceFilePath(projectContext, sourcePath);
if (fs::exists(makefile)) {
try {
auto tests = getTestsFromMakefile(makefile, testFilePath);
Expand Down

0 comments on commit fbb6bf4

Please sign in to comment.