summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch13/13.0/S13_A10.js
blob: dd85f242bdbbc90121f752ab4a2be9ea7d738e6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * Function is a data
 *
 * @path ch13/13.0/S13_A10.js
 * @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") {
	$ERROR('#1: typeof __music_box.ziggy === "function". Actual: typeof __music_box.ziggy ==='+typeof __music_box.ziggy);
}
//
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__music_box.ziggy() !== "ziggy stardust") {
	$ERROR('#2: __music_box.ziggy() === "ziggy stardust". Actual: __music_box.ziggy() ==='+__music_box.ziggy());
}
//
//////////////////////////////////////////////////////////////////////////////