From 55f7c6d835da04fe856e3126ad39ad6abee70c20 Mon Sep 17 00:00:00 2001 From: littleGnAl Date: Wed, 15 Nov 2023 13:38:04 +0800 Subject: [PATCH] feat: Move tmp preprocess files to /.terra/cxx_parser/preProcess@ --- .../cxx_parser.integration.test.ts | 2 +- cxx-parser/__tests__/unit_test/cxx_parser.test.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cxx-parser/__integration_test__/cxx_parser.integration.test.ts b/cxx-parser/__integration_test__/cxx_parser.integration.test.ts index 95d5a94..890a5d3 100644 --- a/cxx-parser/__integration_test__/cxx_parser.integration.test.ts +++ b/cxx-parser/__integration_test__/cxx_parser.integration.test.ts @@ -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); diff --git a/cxx-parser/__tests__/unit_test/cxx_parser.test.ts b/cxx-parser/__tests__/unit_test/cxx_parser.test.ts index 6ee00d9..589b572 100644 --- a/cxx-parser/__tests__/unit_test/cxx_parser.test.ts +++ b/cxx-parser/__tests__/unit_test/cxx_parser.test.ts @@ -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"`; @@ -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"`; @@ -249,8 +249,8 @@ describe('cxx_parser', () => { let json = dumpCXXAstJson( new TerraContext(tmpDir), [], - [], - [file1Path, file2Path] + [file1Path, file2Path], + [] ); expect(execSync).not.toHaveBeenCalled();