12345678910111213141516171819202122232425262728293031323334353637383940 |
- var l = new List();
- l.toString() == "{}";
- l.isEmpty() == true;
- l.remove("1") == false;
- l.length == 0;
- l.first() == null;
- l.last() == null;
- l.pop() == null;
- l.add("1");
- l.length == 1;
- l.first() == "1";
- l.last() == "1";
- l.toString() == "{1}";
- l.isEmpty() == false;
- l.join("x") == "1";
- l.pop() == "1";
- l.remove("1") == false;
- l.length == 0;
- l.add("1");
- l.length == 1;
- l.remove("1") == true;
- l.add("1");
- l.push("2");
- l.length == 2;
- l.first() == "2";
- l.last() == "1";
- l.toString() == "{2, 1}";
- l.join("x") == "2x1";
- l.clear();
- l.isEmpty() == true;
- l.add("1");
- l.add("2");
- l.add("3");
- var l2 = l.map(function(i:String) return i + i);
- l2.pop() == "11";
- l2.pop() == "22";
- l2.pop() == "33";
- var l3 = l.filter(function(i:String) return i != "2");
- l3.pop() == "1";
- l3.pop() == "3";
|