Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-460117.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 var gTestfile = 'regress-460117.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 460117;
9 var summary = 'TM: hasOwnProperty with JIT';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 function t(o, proplist) {
25 var props=proplist.split(/\s+/g);
26 for (var i=0, len=props.length; i<len; i++) {
27 if (o.hasOwnProperty(props[i])) {
28 // do something
29 } else {
30 actual += (props[i]+': '+o.hasOwnProperty(props[i]));
31 }
32 }
33 };
34
35 t({ bar: 123, baz: 123, quux: 123 }, 'bar baz quux');
36
37 reportCompare(expect, actual, summary + ' : nonjit');
38
39 jit(true);
40
41 t({ bar: 123, baz: 123, quux: 123 }, 'bar baz quux');
42
43 jit(false);
44
45 reportCompare(expect, actual, summary + ' : jit');
46
47 exitFunc ('test');
48 }