Debian Codegraph @

rhino/testsrc/tests/lc3/ConvertJSObject/ToJSObject-001.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 = 'ToJSObject-001.js';
7
8 /**
9 * Preferred Argument Conversion.
10 *
11 * Passing a JavaScript boolean to a Java method should prefer to call
12 * a Java method of the same name that expects a Java boolean.
13 *
14 */
15 var SECTION = "Preferred argument conversion: boolean";
16 var VERSION = "1_4";
17 var TITLE = "LiveConnect 3.0 JavaScript to Java Data Type Conversion " +
18 SECTION;
19 startTest();
20
21 var TEST_CLASS = new
22 Packages.com.netscape.javascript.qa.lc3.jsobject.JSObject_001;
23
24 new TestCase(
25 "TEST_CLASS.ambiguous( new String() ) +''",
26 "JSOBJECT",
27 TEST_CLASS.ambiguous(new String()) +'' );
28
29 new TestCase(
30 "TEST_CLASS.ambiguous( new Boolean() ) +''",
31 "JSOBJECT",
32 TEST_CLASS.ambiguous( new Boolean() )+'' );
33
34 new TestCase(
35 "TEST_CLASS.ambiguous( new Number() ) +''",
36 "JSOBJECT",
37 TEST_CLASS.ambiguous( new Number() )+'' );
38
39 new TestCase(
40 "TEST_CLASS.ambiguous( new Date() ) +''",
41 "JSOBJECT",
42 TEST_CLASS.ambiguous( new Date() )+'' );
43
44 new TestCase(
45 "TEST_CLASS.ambiguous( new Function() ) +''",
46 "JSOBJECT",
47 TEST_CLASS.ambiguous( new Function() )+'' );
48
49 new TestCase(
50 "TEST_CLASS.ambiguous( new Array() ) +''",
51 "JSOBJECT",
52 TEST_CLASS.ambiguous( new Array() )+'' );
53
54 new TestCase(
55 "TEST_CLASS.ambiguous( this ) +''",
56 "JSOBJECT",
57 TEST_CLASS.ambiguous( this )+'' );
58
59 new TestCase(
60 "TEST_CLASS.ambiguous( new RegExp() ) +''",
61 "JSOBJECT",
62 TEST_CLASS.ambiguous( new RegExp() )+'' );
63
64 new TestCase(
65 "TEST_CLASS.ambiguous( Math ) +''",
66 "JSOBJECT",
67 TEST_CLASS.ambiguous( Math )+'' );
68
69 new TestCase(
70 "TEST_CLASS.ambiguous( new Object() ) +''",
71 "JSOBJECT",
72 TEST_CLASS.ambiguous( new Object() )+'' );
73
74 test();