tests: Add a test for the `delete` operator
This commit is contained in:
parent
f3cf82ad5a
commit
f6ea1b2bff
|
@ -0,0 +1,22 @@
|
||||||
|
package {
|
||||||
|
public class Test {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trace("/// var a: Vector.<int> = new <int>[2,3];");
|
||||||
|
var a:Vector.<int> = new <int>[2,3];
|
||||||
|
|
||||||
|
trace(a[0]);
|
||||||
|
trace(a[1]);
|
||||||
|
|
||||||
|
trace("/// delete a[0];");
|
||||||
|
trace(delete a[0]);
|
||||||
|
|
||||||
|
trace(a[0]);
|
||||||
|
trace(a[1]);
|
||||||
|
|
||||||
|
trace("/// delete a[1];");
|
||||||
|
trace(delete a[1]);
|
||||||
|
|
||||||
|
trace(a[0]);
|
||||||
|
trace(a[1]);
|
|
@ -0,0 +1,11 @@
|
||||||
|
/// var a: Vector.<int> = new <int>[2,3];
|
||||||
|
2
|
||||||
|
3
|
||||||
|
/// delete a[0];
|
||||||
|
true
|
||||||
|
2
|
||||||
|
3
|
||||||
|
/// delete a[1];
|
||||||
|
true
|
||||||
|
2
|
||||||
|
3
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue