Skip to content

Commit

Permalink
feat: Move tmp preprocess files to <my_project>/.terra/cxx_parser/pre…
Browse files Browse the repository at this point in the history
…Process@<check_sum>
  • Loading branch information
littleGnAl committed Nov 15, 2023
1 parent ff2bc65 commit 55f7c6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct AAA {
]
`;

let json = dumpCXXAstJson(new TerraContext(tmpDir), [], [], [file1Path]);
let json = dumpCXXAstJson(new TerraContext(tmpDir), [], [file1Path], []);

expect(fs.existsSync(preProcessParseFilesDir)).toBe(true);

Expand Down
12 changes: 6 additions & 6 deletions cxx-parser/__tests__/unit_test/cxx_parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ describe('cxx_parser', () => {
let json = dumpCXXAstJson(
new TerraContext(tmpDir),
[],
[],
[file1Path, file2Path]
[file1Path, file2Path],
[]
);

let expectedBashScript = `bash ${cppastBackendBuildBashPath} \"${cppastBackendBuildDir}\" "--visit-headers=${file1Path},${file2Path} --include-header-dirs= --defines-macros="" --custom-headers= --output-dir=${jsonFilePath} --pre-process-dir=${preProcessParseFilesDir} --dump-json"`;
Expand Down Expand Up @@ -174,8 +174,8 @@ describe('cxx_parser', () => {
let json = dumpCXXAstJson(
new TerraContext(tmpDir, '', '', true, false),
[],
[],
[file1Path, file2Path]
[file1Path, file2Path],
[]
);

let expectedBashScript = `bash ${cppastBackendBuildBashPath} \"${cppastBackendBuildDir}\" "--visit-headers=${file1Path},${file2Path} --include-header-dirs= --defines-macros="" --custom-headers= --output-dir=${jsonFilePath} --pre-process-dir=${preProcessParseFilesDir} --dump-json"`;
Expand Down Expand Up @@ -249,8 +249,8 @@ describe('cxx_parser', () => {
let json = dumpCXXAstJson(
new TerraContext(tmpDir),
[],
[],
[file1Path, file2Path]
[file1Path, file2Path],
[]
);

expect(execSync).not.toHaveBeenCalled();
Expand Down

0 comments on commit 55f7c6d

Please sign in to comment.