| 1 |
// Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
This test should be run without any built-ins being added/augmented. |
| 7 |
The name JSON must be bound to an object. |
| 8 |
Section 15 says that every built-in Function object described in this |
| 9 |
section � whether as a constructor, an ordinary function, or both � has |
| 10 |
a length property whose value is an integer. Unless otherwise specified, |
| 11 |
this value is equal to the largest number of named arguments shown in |
| 12 |
the section headings for the function description, including optional |
| 13 |
parameters. |
| 14 |
This default applies to JSON.stringify, and it must exist as a function |
| 15 |
taking 3 parameters. |
| 16 |
es5id: 15.12.3-0-2 |
| 17 |
description: JSON.stringify must exist as be a function taking 3 parameters |
| 18 |
---*/ |
| 19 |
|
| 20 |
var f = JSON.stringify; |
| 21 |
|
| 22 |
assert.sameValue(typeof(f), "function", 'typeof(f)'); |
| 23 |
assert.sameValue(f.length, 3, 'f.length'); |