Debian Codegraph @

rhino/testsrc/tests/e4x/Types/9.1.1.6.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 = '9.1.1.6.js';
8
9 START("9.1.1.6 - XML [[HasProperty]]");
10
11 x = <alpha attr1="value1">one<bravo>two<charlie>three</charlie></bravo></alpha>;
12 TEST(1, true, "bravo" in x);
13 TEST(2, true, 0 in x);
14 TEST(3, true, "charlie" in x.bravo);
15 TEST(4, true, 0 in x.bravo);
16 TEST(5, false, 1 in x);
17 TEST(6, false, 1 in x.bravo);
18 TEST(7, false, 2 in x);
19 TEST(8, false, 2 in x.bravo);
20 TEST(9, false, "foobar" in x);
21 TEST(10, false, "foobar" in x.bravo);
22
23 END();