Skip to content

Commit 9c21872

Browse files
committed
generated file verification is now an option
1 parent e1731d0 commit 9c21872

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ clean:
99

1010
e2e-test:
1111
rm -rf test-out
12-
neko run.n test/e2e test-out/
12+
neko run.n -verifyGeneratedFiles test/e2e test-out/
1313

1414
unit-test:
1515
haxelib run munit test -neko

src/Run.hx

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ class Run {
6363
warnings.set(name, writer.process(program, fw));
6464
fw.close();
6565

66-
verifyGeneratedFile(f, src, name);
66+
if(cfg.verifyGeneratedFiles) {
67+
verifyGeneratedFile(f, src, name);
68+
}
6769

6870
}
6971
}

src/as3hx/Config.hx

+6
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class Config {
5858
public var useFastXML : Bool;
5959
/** use Haxe general compatibility class */
6060
public var useCompat : Bool;
61+
/** diff the generated .hx files against expected .hx files if they exists **/
62+
public var verifyGeneratedFiles : Bool;
6163

6264
/**
6365
* a list of absolute or relative directory paths.
@@ -246,6 +248,8 @@ class Config {
246248
guessCasts = false;
247249
case "-vector2array", "--vector2array":
248250
vectorToArray = true;
251+
case "-verifyGeneratedFiles", "--verifyGeneratedFiles":
252+
verifyGeneratedFiles = true;
249253
case "-debug-expr", "--debug-expr":
250254
debugExpr = true;
251255
case "-no-func2dyn", "--no-func2dyn":
@@ -302,6 +306,7 @@ class Config {
302306
case "forcePrivateSetter": setBoolField(el, true);
303307
case "errorContinue": setBoolField(el, true);
304308
case "testCase": setBoolField(el, false);
309+
case "verifyGeneratedFiles": setBoolField(el, false);
305310
case "excludeList": setExcludeField(el, new List());
306311
case "conditionalCompilationList": setConditionalVars(el, new List());
307312
case "dictionaryToHash": setBoolField(el, false);
@@ -409,6 +414,7 @@ class Config {
409414
<excludeList />
410415
<conditionalCompilationList />
411416
<dictionaryToHash value="false" />
417+
<verifyGeneratedFiles value="false" />
412418
<useFastXML value="true" />
413419
<useCompat value="true" />
414420
<importPaths></importPaths>

0 commit comments

Comments
 (0)