michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * The FunctionBody must be SourceElements michael@0: * michael@0: * @path ch13/13.0/S13_A7_T1.js michael@0: * @description Using only SourceElements within the FunctionBody michael@0: */ michael@0: michael@0: function __func(){'ground control to major tom'}; michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (typeof __func !== "function") { michael@0: $ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: function __func__2(){b}; michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#2 michael@0: if (typeof __func__2 !== "function") { michael@0: $ERROR('#2: typeof __func__2 === "function". Actual: typeof __func__2 ==='+typeof __func__2); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: function __func__3(){1}; michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#3 michael@0: if (typeof __func__3 !== "function") { michael@0: $ERROR('#3: typeof __func__3 === "function". Actual: typeof __func__3 ==='+typeof __func__3); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: function __func__4(){1+c}; michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#4 michael@0: if (typeof __func__4 !== "function") { michael@0: $ERROR('#4: typeof __func__4 === "function". Actual: typeof __func__4 ==='+typeof __func__4); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: function __func__5(){inc(d)}; michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#5 michael@0: if (typeof __func__5 !== "function") { michael@0: $ERROR('#5: typeof __func__5 === "function". Actual: typeof __func__5 ==='+typeof __func__5); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: function __func__6(){var \u0042 = 1;}; michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#6 michael@0: if (typeof __func__6 !== "function") { michael@0: $ERROR('#6: typeof __func__6 === "function". Actual: typeof __func__6 ==='+typeof __func__6); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: //function __func__7(){var \u003d = 1;}; michael@0: //////////////////////////////////////////////////////////////////////////////// michael@0: ////CHECK#7 michael@0: //if (typeof __func__7 !== "function") { michael@0: // $ERROR('#7: The FunctionBody must be SourceElements'); michael@0: //} michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: