Debian Codegraph @

rhino/testsrc/tests/e4x/QName/13.3.1.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 gTestfile = '13.3.1.js';
8
9 START("13.3.1 - QName Constructor as a Function");
10
11 q = QName("foobar");
12 p = new QName("foobar");
13 TEST(1, typeof(p), typeof(q));
14 TEST(2, p.localName, q.localName);
15 TEST(3, p.uri, q.uri);
16
17 q = QName("http://foobar/", "foobar");
18 p = new QName("http://foobar/", "foobar");
19 TEST(4, typeof(p), typeof(q));
20 TEST(5, p.localName, q.localName);
21 TEST(6, p.uri, q.uri);
22
23 p1 = QName(q);
24 p2 = new QName(q);
25 TEST(7, typeof(p2), typeof(p1));
26 TEST(8, p2.localName, p1.localName);
27 TEST(9, p2.uri, p1.uri);
28
29 n = new Namespace("http://foobar/");
30 q = QName(n, "foobar");
31 p = QName(n, "foobar");
32 TEST(10, typeof(p), typeof(q));
33 TEST(11, p.localName, q.localName);
34 TEST(12, p.uri, q.uri);
35
36 p = QName(q);
37 TEST(13, p, q);
38
39 END();