@@ -10,9 +10,9 @@ class Issue12001 extends TestCase {
10
10
runHaxe (args );
11
11
assertSuccess ();
12
12
13
+ // Nothing is loading Foo, so no redefinition issue
13
14
runHaxe (args );
14
- Assert .isFalse (0 == errorMessages .length );
15
- assertErrorMessage (" Cannot redefine module Foo" );
15
+ assertSuccess ();
16
16
}
17
17
18
18
function testDefineType1 (_ ) {
@@ -23,8 +23,9 @@ class Issue12001 extends TestCase {
23
23
assertSuccess ();
24
24
25
25
runHaxe (args );
26
- Assert .isFalse (hasErrorMessage (' HxbData.HxbFailure("Could not read static field test on Foo while hxbing Main")' ));
27
- assertErrorMessage (" Cannot redefine module Foo" );
26
+ assertSuccess ();
27
+ // TODO: change invalidation reason
28
+ assertSkipping (" Main" , DependencyDirty (" Foo - Tainted server/invalidate" ));
28
29
}
29
30
30
31
function testDefineModule (_ ) {
@@ -34,9 +35,9 @@ class Issue12001 extends TestCase {
34
35
runHaxe (args );
35
36
assertSuccess ();
36
37
38
+ // Nothing is loading Bar, so no redefinition issue
37
39
runHaxe (args );
38
- Assert .isFalse (0 == errorMessages .length );
39
- assertErrorMessage (" Cannot redefine module Bar" );
40
+ assertSuccess ();
40
41
}
41
42
42
43
function testDefineModule1 (_ ) {
@@ -47,9 +48,9 @@ class Issue12001 extends TestCase {
47
48
assertSuccess ();
48
49
49
50
runHaxe (args );
50
- Assert . isFalse ( 0 == errorMessages . length );
51
- Assert . isFalse ( hasErrorMessage ( ' HxbData.HxbFailure("Could not read static field test on Bar while hxbing Main") ' ));
52
- assertErrorMessage ( " Cannot redefine module Bar " );
51
+ assertSuccess ( );
52
+ // TODO: change invalidation reason
53
+ assertSkipping ( " Main " , DependencyDirty ( " Bar - Tainted server/invalidate " ) );
53
54
}
54
55
55
56
@:async
@@ -77,9 +78,9 @@ class Issue12001 extends TestCase {
77
78
runHaxe (args );
78
79
assertSuccess ();
79
80
81
+ // Nothing is loading Baz, so it can be defined again
80
82
runHaxe (args );
81
- Assert .isFalse (0 == errorMessages .length );
82
- assertErrorMessage (" Cannot redefine module Baz" );
83
+ assertSuccess ();
83
84
}
84
85
85
86
@:async
@@ -92,6 +93,7 @@ class Issue12001 extends TestCase {
92
93
function test () {
93
94
runHaxe (args , () -> {
94
95
assertSuccess ();
96
+ // Newest version is being included
95
97
assertHasPrint (" Foobaz.test() = " + i );
96
98
if (++ i >= 5 ) async .done ();
97
99
else test ();
@@ -101,15 +103,15 @@ class Issue12001 extends TestCase {
101
103
}
102
104
103
105
function testInvalidateError (_ ) {
104
- vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro .hx" ));
106
+ vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro1 .hx" ));
105
107
vfs .putContent (" Empty.hx" , getTemplate (" Empty.hx" ));
106
108
var args = [" -main" , " Empty" , " --interp" , " --macro" , " Macro.hookInvalidateError()" ];
107
109
runHaxe (args );
108
110
assertErrorMessage (" Cannot invalidate loaded module Empty" );
109
111
}
110
112
111
113
function testInvalidateCaughtError (_ ) {
112
- vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro .hx" ));
114
+ vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro1 .hx" ));
113
115
vfs .putContent (" Empty.hx" , getTemplate (" Empty.hx" ));
114
116
var args = [" -main" , " Empty" , " --interp" , " --macro" , " Macro.hookInvalidateCatch()" ];
115
117
runHaxe (args );
0 commit comments