|
134 | 134 | @test testee(:(abstract type a{T,S} end), [], [:a], [], [:a => ([], [], [], [])]) |
135 | 135 | @test testee(:(abstract type a{T} <: b end), [], [:a], [], [:a => ([:b], [], [], [])]) |
136 | 136 | @test testee(:(abstract type a{T} <: b{T} end), [], [:a], [], [:a => ([:b], [], [], [])]) |
137 | | - testee(macroexpand(Main, :(@enum a b c)), [], [], [], []; verbose=false) |
| 137 | + |
| 138 | + # testee(macroexpand(Main, :(@enum NewType1 xx yy)), [], [], [], []; verbose=false) # test that it runs without error |
| 139 | + let result = ExpressionExplorer.compute_reactive_node( |
| 140 | + macroexpand(Main, :(@enum NewType2 xx yy)) |
| 141 | + ) |
| 142 | + |
| 143 | + @test :NewType2 ∉ result.references |
| 144 | + @test :xx ∉ result.references |
| 145 | + |
| 146 | + @test :NewType2 ∈ result.definitions ∪ result.funcdefs_without_signatures |
| 147 | + @test :xx ∈ result.definitions |
| 148 | + @test :yy ∈ result.definitions |
| 149 | + end |
138 | 150 |
|
139 | 151 | e = :(struct a end) # needs to be on its own line to create LineNumberNode |
140 | 152 | @test testee(e, [], [:a], [], [:a => ([], [], [], [])]) |
|
346 | 358 | @test testee(:(function (A::MyType)(x; y=x) y + x end), [], [], [], [ |
347 | 359 | :MyType => ([], [], [:+], []) |
348 | 360 | ]) |
| 361 | + @test testee(:(function $(esc(:g))() r = 2; r end), [], [], [], [ |
| 362 | + :g => ([], [], [], []) |
| 363 | + ]) |
349 | 364 | @test testee(:(f(x, y=a + 1) = x * y * z), [], [], [], [ |
350 | 365 | :f => ([:z, :a], [], [:*, :+], []) |
351 | 366 | ]) |
|
0 commit comments