js/src/tests/test262/ch13/13.0/S13_A7_T1.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/test262/ch13/13.0/S13_A7_T1.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,73 @@
     1.4 +// Copyright 2009 the Sputnik authors.  All rights reserved.
     1.5 +// This code is governed by the BSD license found in the LICENSE file.
     1.6 +
     1.7 +/**
     1.8 + * The FunctionBody must be SourceElements
     1.9 + *
    1.10 + * @path ch13/13.0/S13_A7_T1.js
    1.11 + * @description Using only SourceElements within the FunctionBody
    1.12 + */
    1.13 +
    1.14 +function __func(){'ground control to major tom'};
    1.15 +//////////////////////////////////////////////////////////////////////////////
    1.16 +//CHECK#1
    1.17 +if (typeof __func !== "function") {
    1.18 +	$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
    1.19 +}
    1.20 +//
    1.21 +//////////////////////////////////////////////////////////////////////////////
    1.22 +
    1.23 +function __func__2(){b};
    1.24 +//////////////////////////////////////////////////////////////////////////////
    1.25 +//CHECK#2
    1.26 +if (typeof __func__2 !== "function") {
    1.27 +	$ERROR('#2: typeof __func__2 === "function". Actual: typeof __func__2 ==='+typeof __func__2);
    1.28 +}
    1.29 +//
    1.30 +//////////////////////////////////////////////////////////////////////////////
    1.31 +
    1.32 +function __func__3(){1};
    1.33 +//////////////////////////////////////////////////////////////////////////////
    1.34 +//CHECK#3
    1.35 +if (typeof __func__3 !== "function") {
    1.36 +	$ERROR('#3: typeof __func__3 === "function". Actual: typeof __func__3 ==='+typeof __func__3);
    1.37 +}
    1.38 +//
    1.39 +//////////////////////////////////////////////////////////////////////////////
    1.40 +
    1.41 +function __func__4(){1+c};
    1.42 +//////////////////////////////////////////////////////////////////////////////
    1.43 +//CHECK#4
    1.44 +if (typeof __func__4 !== "function") {
    1.45 +	$ERROR('#4: typeof __func__4 === "function". Actual: typeof __func__4 ==='+typeof __func__4);
    1.46 +}
    1.47 +//
    1.48 +//////////////////////////////////////////////////////////////////////////////
    1.49 +
    1.50 +function __func__5(){inc(d)};
    1.51 +//////////////////////////////////////////////////////////////////////////////
    1.52 +//CHECK#5
    1.53 +if (typeof __func__5 !== "function") {
    1.54 +	$ERROR('#5: typeof __func__5 === "function". Actual: typeof __func__5 ==='+typeof __func__5);
    1.55 +}
    1.56 +//
    1.57 +//////////////////////////////////////////////////////////////////////////////
    1.58 +
    1.59 +function __func__6(){var \u0042 = 1;};
    1.60 +//////////////////////////////////////////////////////////////////////////////
    1.61 +//CHECK#6
    1.62 +if (typeof __func__6 !== "function") {
    1.63 +	$ERROR('#6: typeof __func__6 === "function". Actual: typeof __func__6 ==='+typeof __func__6);
    1.64 +}
    1.65 +//
    1.66 +//////////////////////////////////////////////////////////////////////////////
    1.67 +
    1.68 +//function __func__7(){var \u003d = 1;};
    1.69 +////////////////////////////////////////////////////////////////////////////////
    1.70 +////CHECK#7
    1.71 +//if (typeof __func__7 !== "function") {
    1.72 +//	$ERROR('#7: The FunctionBody must be SourceElements');
    1.73 +//}
    1.74 +//
    1.75 +//////////////////////////////////////////////////////////////////////////////
    1.76 +

mercurial