Debian Codegraph @

rhino/testsrc/tests/js1_8_1/decompilation/regress-466905-03.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-466905-03.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 466905;
9 var summary = 'decompile anonymous functions returning arrays';
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 expect = 'function () {\n' +
25 'return [];\n' +
26 '},function () {\n' +
27 'return [1];\n' +
28 '},function () {\n' +
29 'return [1, ];\n' +
30 '},function () {\n' +
31 'return [1, 2];\n' +
32 '},function () {\n' +
33 'return [1, , 3];\n' +
34 '},function () {\n' +
35 'return [1, , 3, ];\n' +
36 '},function () {\n' +
37 'return [(a, b)];\n' +
38 '},function () {\n' +
39 'return foo((a, b));\n' +
40 '}';
41 actual = ([
42 function() { return []; },
43 function() { return [1]; },
44 function() { return [1, ]; },
45 function() { return [1, 2]; },
46 function() { return [1, , 3]; },
47 function() { return [1, , 3, ]; },
48 function() { return [(a, b)]; },
49 function() { return foo((a, b)); },
50 ]) + '';
51
52 compareSource(expect, actual, summary);
53
54 exitFunc ('test');
55 }