Debian Codegraph @

rhino/testsrc/tests/lc2/Objects/object-004.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 gTestfile = 'object-004.js';
7
8 /**
9 File Name: object-004.js
10 Description:
11
12 Getting and Setting Java Object properties by index value.
13
14 @author [email protected]
15 @version 1.00
16 */
17 var SECTION = "LiveConnect Objects";
18 var VERSION = "1_3";
19 var TITLE = "Getting and setting JavaObject properties by index value";
20
21 startTest();
22 writeHeaderToLog( SECTION + " "+ TITLE);
23
24 var vector = new java.util.Vector();
25
26 new TestCase(
27 SECTION,
28 "var vector = new java.util.Vector(); vector.addElement(\"hi\")",
29 void 0,
30 vector.addElement("hi") );
31
32 new TestCase(
33 SECTION,
34 "vector.elementAt(0) +''",
35 "hi",
36 vector.elementAt(0)+"" );
37
38 new TestCase(
39 SECTION,
40 "vector.setElementAt( \"hello\", 0)",
41 void 0,
42 vector.setElementAt( "hello", 0) );
43
44 new TestCase(
45 SECTION,
46 "vector.elementAt(0) +''",
47 "hello",
48 vector.elementAt(0)+"" );
49
50 test();
51