@@ -15,16 +15,23 @@ class Issue12001 extends TestCase {
15
15
assertSuccess ();
16
16
}
17
17
18
- function testDefineType1 (_ ) {
18
+ @:async
19
+ @:timeout (3000 )
20
+ function testRedefineType (async : Async ) {
19
21
vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro.hx" ));
20
22
vfs .putContent (" Main.hx" , getTemplate (" issues/Issue12001/Main.hx" ));
21
- var args = [" -main" , " Main" , " --macro" , " Macro.defineType()" ];
22
- runHaxe (args );
23
- assertSuccess ();
24
-
25
- runHaxe (args );
26
- assertSuccess ();
27
- assertSkipping (" Main" , DependencyDirty (" Foo - Tainted define_type" ));
23
+ var args = [" -main" , " Main" , " --interp" , " --macro" , " Macro.defineType()" ];
24
+ var i = 0 ;
25
+ function test () {
26
+ // Was failing with nightlies (HxbFailure)
27
+ runHaxe (args , () -> {
28
+ assertSuccess ();
29
+ assertHasPrint (" Foo.test() = " + i );
30
+ if (++ i >= 5 ) async .done ();
31
+ else test ();
32
+ });
33
+ }
34
+ test ();
28
35
}
29
36
30
37
function testDefineModule (_ ) {
@@ -39,48 +46,25 @@ class Issue12001 extends TestCase {
39
46
assertSuccess ();
40
47
}
41
48
42
- function testDefineModule1 (_ ) {
43
- vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro.hx" ));
44
- vfs .putContent (" Main.hx" , getTemplate (" issues/Issue12001/Main1.hx" ));
45
- var args = [" -main" , " Main" , " --macro" , " Macro.defineModule()" ];
46
- runHaxe (args );
47
- assertSuccess ();
48
-
49
- runHaxe (args );
50
- assertSuccess ();
51
- assertSkipping (" Main" , DependencyDirty (" Bar - Tainted define_module" ));
52
- }
53
-
54
49
@:async
55
50
@:timeout (3000 )
56
51
function testRedefineModule (async : Async ) {
57
52
vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro.hx" ));
58
- vfs .putContent (" Main.hx" , getTemplate (" issues/Issue12001/Main2 .hx" ));
59
- var args = [" -main" , " Main" , " --interp" , " --macro" , " Macro.redefineModule ()" ];
53
+ vfs .putContent (" Main.hx" , getTemplate (" issues/Issue12001/Main1 .hx" ));
54
+ var args = [" -main" , " Main" , " --interp" , " --macro" , " Macro.defineModule ()" ];
60
55
var i = 0 ;
61
56
function test () {
57
+ // Was failing with nightlies (HxbFailure)
62
58
runHaxe (args , () -> {
63
59
assertSuccess ();
64
- assertHasPrint (" Foobar .test() = " + i );
60
+ assertHasPrint (" Bar .test() = " + i );
65
61
if (++ i >= 5 ) async .done ();
66
62
else test ();
67
63
});
68
64
}
69
65
test ();
70
66
}
71
67
72
- function testAfterTyping (_ ) {
73
- vfs .putContent (" Macro.hx" , getTemplate (" issues/Issue12001/Macro.hx" ));
74
- vfs .putContent (" Empty.hx" , getTemplate (" Empty.hx" ));
75
- var args = [" -main" , " Empty" , " --macro" , " Macro.hook()" ];
76
- runHaxe (args );
77
- assertSuccess ();
78
-
79
- // Nothing is loading Baz, so it can be defined again
80
- runHaxe (args );
81
- assertSuccess ();
82
- }
83
-
84
68
@:async
85
69
@:timeout (3000 )
86
70
function testRedefineAfterTyping (async : Async ) {
@@ -92,7 +76,7 @@ class Issue12001 extends TestCase {
92
76
runHaxe (args , () -> {
93
77
assertSuccess ();
94
78
// Newest version is being included
95
- assertHasPrint (" Foobaz .test() = " + i );
79
+ assertHasPrint (" Baz .test() = " + i );
96
80
if (++ i >= 5 ) async .done ();
97
81
else test ();
98
82
});
0 commit comments