Skip to content

Commit

Permalink
fix on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
SatyaRanjanDas-tomtom committed Oct 24, 2024
1 parent 1d4f6c3 commit b4d6e6a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cppparser/test/app/cppparsertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <boost/program_options.hpp>
#include <boost/system/config.hpp>


#include <filesystem>

namespace fs = std::filesystem;
Expand All @@ -24,8 +23,8 @@ namespace bpo = boost::program_options;
//////////////////////////////////////////////////////////////////////////

static bool parseAndEmitFormatted(cppparser::CppParser& parser,
const fs::path& inputFilePath,
const fs::path& outputFilePath,
const fs::path& inputFilePath,
const fs::path& outputFilePath,
const cppcodegen::CppWriter& cppWriter)
{
auto progUnit = parser.parseFile(inputFilePath.string().c_str());
Expand Down Expand Up @@ -61,17 +60,17 @@ static std::pair<size_t, size_t> performTest(cppparser::CppParser& parser, const
++dirItr)
{
cppcodegen::CppWriter cppWriter;
fs::path file = *dirItr;
fs::path file = *dirItr;
if (fs::is_regular_file(file))
{
++numInputFiles;
std::cout << "CppParserTest: Parsing " << file.string() << " ...\n";
auto fileRelPath = file.string().substr(inputPathLen);
fs::path outfile = params.outputPath / fileRelPath;
const auto fileRelPath = file.string().substr(inputPathLen + 1);
fs::path outfile = params.outputPath / fileRelPath;
fs::remove(outfile);
if (parseAndEmitFormatted(parser, file, outfile, cppWriter) && fs::exists(outfile))
{
fs::path masfile = params.masterPath / fileRelPath;
fs::path masfile = params.masterPath / fileRelPath;
std::pair<int, int> diffStartInfo;
auto rez = compareFiles(outfile, masfile, diffStartInfo);
if (rez == kSameFiles)
Expand Down

0 comments on commit b4d6e6a

Please sign in to comment.