Debian Codegraph @

rhino/testsrc/tests/js1_7/geniter/iterator-toString.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 = 'iterator-toString.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = "(none)";
9 var summary = "gen.toString() omitting 'yield' from value";
10 var actual, expect;
11
12 printBugNumber(BUGNUMBER);
13 printStatus(summary);
14
15 /**************
16 * BEGIN TEST *
17 **************/
18
19 var failed = false;
20
21 function gen()
22 {
23 yield 17;
24 }
25
26 try
27 {
28 var str = gen.toString();
29 var index = str.search(/yield/);
30
31 if (index < 0)
32 throw "yield not found in str: " + str;
33 }
34 catch (e)
35 {
36 failed = e;
37 }
38
39
40
41 expect = false;
42 actual = failed;
43
44 reportCompare(expect, actual, summary);