summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/function/S13_A10.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/statements/function/S13_A10.js')
-rw-r--r--js/src/tests/test262/language/statements/function/S13_A10.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/statements/function/S13_A10.js b/js/src/tests/test262/language/statements/function/S13_A10.js
new file mode 100644
index 0000000000..29a737ded2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/function/S13_A10.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Function is a data
+es5id: 13_A10
+description: Using function as a property of an object
+---*/
+
+function __ziggy__func(){return "ziggy stardust"}
+
+var __music_box={};
+
+__music_box.ziggy = __ziggy__func;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (typeof __music_box.ziggy !== "function") {
+ throw new Test262Error('#1: typeof __music_box.ziggy === "function". Actual: typeof __music_box.ziggy ==='+typeof __music_box.ziggy);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__music_box.ziggy() !== "ziggy stardust") {
+ throw new Test262Error('#2: __music_box.ziggy() === "ziggy stardust". Actual: __music_box.ziggy() ==='+__music_box.ziggy());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);