| 1 |
-- main.mcl -- |
| 2 |
class c1($b) { |
| 3 |
test "t1" {} |
| 4 |
if $b { |
| 5 |
test "t2" {} |
| 6 |
} else { |
| 7 |
test "t3" {} |
| 8 |
} |
| 9 |
class c0 { |
| 10 |
test "t4" {} |
| 11 |
if $b { |
| 12 |
test "t5" {} |
| 13 |
} else { |
| 14 |
test "t6" {} |
| 15 |
} |
| 16 |
$x = if $b { |
| 17 |
"hello" |
| 18 |
} else { |
| 19 |
"goodbye" |
| 20 |
} |
| 21 |
} |
| 22 |
} |
| 23 |
include c1(true) as i1 |
| 24 |
include i1.c0 as i01 |
| 25 |
|
| 26 |
include c1(false) as i2 |
| 27 |
include i2.c0 as i02 |
| 28 |
|
| 29 |
$name1 = $i01.x |
| 30 |
$name2 = $i02.x |
| 31 |
|
| 32 |
test "${name1}" {} |
| 33 |
test "${name2}" {} |
| 34 |
-- OUTPUT -- |
| 35 |
Vertex: test[hello] |
| 36 |
Vertex: test[goodbye] |
| 37 |
Vertex: test[t1] |
| 38 |
Vertex: test[t2] |
| 39 |
Vertex: test[t3] |
| 40 |
Vertex: test[t4] |
| 41 |
Vertex: test[t5] |
| 42 |
Vertex: test[t6] |