Debian Codegraph @

rhino/testsrc/tests/lc2/Methods/method-004-n.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 = 'method-004-n.js';
7
8 /**
9 File Name: method-004-n.js
10 Description:
11
12 Passing arguments of the wrong type, or the wrong number of arguments,
13 should cause a runtime error.
14
15 @author [email protected]
16 @version 1.00
17 */
18 var SECTION = "LiveConnect Objects";
19 var VERSION = "1_3";
20 var TITLE = "Passing bad arguments to a method";
21
22 startTest();
23 writeHeaderToLog( SECTION + " "+ TITLE);
24
25 DESCRIPTION = "var string = new java.lang.String(\"\"); string.charAt(\"foo\")";
26 EXPECTED = "error";
27
28 var string = new java.lang.String("");
29
30 new TestCase(
31 SECTION,
32 "var string = new java.lang.String(\"\"); string.charAt(\"foo\")",
33 "error",
34 string.charAt("foo") );
35
36 test();
37