aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/13_Function_Definition/13.0_Chapter/S13.0_A2_T3.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/sputnik_converted/13_Function_Definition/13.0_Chapter/S13.0_A2_T3.js')
-rw-r--r--test/suite/sputnik_converted/13_Function_Definition/13.0_Chapter/S13.0_A2_T3.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/suite/sputnik_converted/13_Function_Definition/13.0_Chapter/S13.0_A2_T3.js b/test/suite/sputnik_converted/13_Function_Definition/13.0_Chapter/S13.0_A2_T3.js
new file mode 100644
index 000000000..e04b5e594
--- /dev/null
+++ b/test/suite/sputnik_converted/13_Function_Definition/13.0_Chapter/S13.0_A2_T3.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S13_A2_T3;
+* @section: 13;
+* @assertion: function must be evaluated inside the expression;
+* @description: Defining function body with "return arguments[0] +"-"+ arguments[1]";
+*/
+
+
+// Converted for Test262 from original Sputnik source
+
+ES5Harness.registerTest( {
+id: "S13.0_A2_T3",
+
+path: "13_Function_Definition\13.0_Chapter\S13.0_A2_T3.js",
+
+assertion: "function must be evaluated inside the expression",
+
+description: "Defining function body with \"return arguments[0] +\"-\"+ arguments[1]\"",
+
+test: function testcase() {
+ var x = (function __func(){return arguments[0] +"-"+ arguments[1]})("Obi","Wan");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (x !== "Obi-Wan") {
+ $ERROR('#1: x === "Obi-Wan". Actual: x ==='+x);
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (typeof __func !== 'undefined') {
+ $ERROR('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+ }
+});
+