test/script/basic/list.js.EXPECTED

Mon, 07 Apr 2014 21:57:33 +0530

author
sundar
date
Mon, 07 Apr 2014 21:57:33 +0530
changeset 830
3cb09c560108
parent 3
da1e581c933b
child 952
6d5471a497fb
child 1126
0a5ec176e9d8
permissions
-rw-r--r--

8039387: Nashorn supports indexed access of List elements, but length property is not supported
Reviewed-by: lagergren, jlaskey

     1 l.class.name=java.util.ArrayList
     2 l.length=2
     3 l.size()=2
     4 l[0]=foo
     5 l[1]=bar
     6 --for each begin--
     7 foo
     8 bar
     9 --for each end--
    10 l[0]=foo
    11 l[1]=a
    12 l[0.9]=null
    13 l['blah']=null
    14 l[size_name]()=2
    15 java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
    16 java.lang.IndexOutOfBoundsException: Index: Infinity, Size: 2
    17 java.lang.IndexOutOfBoundsException: Index: -Infinity, Size: 2

mercurial