tests: Add test for with
This commit is contained in:
parent
903246d5af
commit
a9f5823074
|
@ -668,6 +668,7 @@ swf_tests! {
|
|||
(as3_vector_legacy, "avm2/vector_legacy", 1),
|
||||
(as3_vector_enumeration, "avm2/vector_enumeration", 1),
|
||||
(as3_sound_valueof, "avm2/sound_valueof", 1),
|
||||
(as3_with, "avm2/with", 1),
|
||||
(as3_sound_embeddedprops, "avm2/sound_embeddedprops", 1),
|
||||
(as3_soundtransform, "avm2/soundtransform", 1),
|
||||
(as3_movieclip_soundtransform, "avm2/movieclip_soundtransform", 49),
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package {
|
||||
public class Test {}
|
||||
}
|
||||
|
||||
with (Math) {
|
||||
trace(abs(-10));
|
||||
}
|
||||
|
||||
var test = {"example": "scope test"}
|
||||
|
||||
with (test) {
|
||||
trace(example);
|
||||
}
|
||||
|
||||
with (Math) {
|
||||
var f = function () {
|
||||
trace(floor(20.3))
|
||||
}
|
||||
f();
|
||||
}
|
||||
|
||||
with (test) {
|
||||
var f = function () {
|
||||
trace(example)
|
||||
}
|
||||
f();
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
10
|
||||
scope test
|
||||
20
|
||||
scope test
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue