| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = '13.5.4.14.js'; |
| 8 |
|
| 9 |
START("13.5.4.14 - XMLList length()"); |
| 10 |
|
| 11 |
TEST(1, true, XMLList.prototype.hasOwnProperty("length")); |
| 12 |
|
| 13 |
x = <><alpha>one</alpha></>; |
| 14 |
|
| 15 |
TEST(2, 1, x.length()); |
| 16 |
|
| 17 |
x = <><alpha>one</alpha><bravo>two</bravo></>; |
| 18 |
|
| 19 |
TEST(2, 2, x.length()); |
| 20 |
|
| 21 |
emps = |
| 22 |
<employees> |
| 23 |
<employee> |
| 24 |
<name>John</name> |
| 25 |
</employee> |
| 26 |
<employee> |
| 27 |
<name>Sue</name> |
| 28 |
</employee> |
| 29 |
</employees> |
| 30 |
|
| 31 |
correct = |
| 32 |
<employees> |
| 33 |
<employee> |
| 34 |
<prefix>Mr.</prefix> |
| 35 |
<name>John</name> |
| 36 |
</employee> |
| 37 |
<employee> |
| 38 |
<name>Sue</name> |
| 39 |
</employee> |
| 40 |
</employees> |
| 41 |
|
| 42 |
TEST(3,2,emps..name.length()); |
| 43 |
|
| 44 |
END(); |