tests: Add test for `newarray`.

This commit is contained in:
David Wendt 2020-08-28 23:20:00 -04:00 committed by Mike Welsh
parent 505018c3b8
commit 75e6018607
5 changed files with 14 additions and 0 deletions

View File

@ -359,6 +359,7 @@ swf_tests! {
(as3_array_storage, "avm2/array_storage", 1),
(as3_array_delete, "avm2/array_delete", 1),
(as3_array_holes, "avm2/array_holes", 1),
(as3_array_literal, "avm2/array_literal", 1),
}
// TODO: These tests have some inaccuracies currently, so we use approx_eq to test that numeric values are close enough.

View File

@ -0,0 +1,10 @@
package {
public class Test {
}
}
var a = ["a", "b", "c"];
trace(a[0]);
trace(a[1]);
trace(a[2]);

View File

@ -0,0 +1,3 @@
a
b
c

Binary file not shown.

Binary file not shown.