mirror of
https://github.com/tc39/test262.git
synced 2025-07-01 11:14:52 +02:00
Updating Google's contribution to r95 of Sputnik tests.
This commit is contained in:
parent
bcc15fd553
commit
02e7fb9cfa
@ -5,5 +5,6 @@
|
|||||||
|
|
||||||
Google Inc.
|
Google Inc.
|
||||||
|
|
||||||
outofhanwell
|
outofhanwell <outofhanwell@gmail.com>
|
||||||
|
Pedro Del Gallego <pedro.delgallego@gmail.com>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Copyright 2009, Google Inc. All rights reserved.
|
Copyright 2009, the Sputnik authors. All rights reserved.
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
met:
|
met:
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.1;
|
* @name: S7.5.3_A1.1;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "abstract" token can not be used as identifier;
|
* @assertion: The "abstract" token can be used as identifier;
|
||||||
* @description: Checking if execution of "abstract=1" fails;
|
* @description: Checking if execution of "abstract=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
abstract = 1;
|
abstract = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.12;
|
* @name: S7.5.3_A1.12;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "final" token can not be used as identifier;
|
* @assertion: The "final" token can be used as identifier;
|
||||||
* @description: Checking if execution of "final=1" fails;
|
* @description: Checking if execution of "final=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
final = 1;
|
final = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.13;
|
* @name: S7.5.3_A1.13;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "float" token can not be used as identifier;
|
* @assertion: The "float" token can be used as identifier;
|
||||||
* @description: Checking if execution of "float=1" fails;
|
* @description: Checking if execution of "float=1" succeeds;
|
||||||
* @negative
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
float = 1;
|
float = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.14;
|
* @name: S7.5.3_A1.14;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "goto" token can not be used as identifier;
|
* @assertion: The "goto" token can be used as identifier;
|
||||||
* @description: Checking if execution of "goto=1" fails;
|
* @description: Checking if execution of "goto=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
goto = 1;
|
goto = 1;
|
||||||
|
@ -4,9 +4,12 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.15;
|
* @name: S7.5.3_A1.15;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "implements" token can not be used as identifier;
|
* @assertion: The "implements" token can not be used as identifier in
|
||||||
* @description: Checking if execution of "implements=1" fails;
|
* strict code;
|
||||||
|
* @description: Checking if execution of "implements=1" fails in
|
||||||
|
* strict code;
|
||||||
* @negative
|
* @negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
implements = 1;
|
implements = 1;
|
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S7.5.3_A1.15;
|
||||||
|
* @section: 7.5.3;
|
||||||
|
* @assertion: The "implements" token can be used as identifier in
|
||||||
|
* non-strict code;
|
||||||
|
* @description: Checking if execution of "implements=1" succeeds in
|
||||||
|
* non-strict code;
|
||||||
|
*/
|
||||||
|
|
||||||
|
new Function('implements = 1');
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.17;
|
* @name: S7.5.3_A1.17;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "int" token can not be used as identifier;
|
* @assertion: The "int" token can be used as identifier;
|
||||||
* @description: Checking if execution of "int=1" fails;
|
* @description: Checking if execution of "int=1" succeeds;
|
||||||
* @negative
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int = 1;
|
int = 1;
|
||||||
|
@ -4,9 +4,12 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.18;
|
* @name: S7.5.3_A1.18;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "interface" token can not be used as identifier;
|
* @assertion: The "interface" token can not be used as identifier in
|
||||||
* @description: Checking if execution of "interface = 1" fails;
|
* strict code;
|
||||||
|
* @description: Checking if execution of "interface = 1" fails in
|
||||||
|
* strict code;
|
||||||
* @negative
|
* @negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
interface = 1;
|
interface = 1;
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S7.5.3_A1.18;
|
||||||
|
* @section: 7.5.3;
|
||||||
|
* @assertion: The "interface" token can be used as identifier in
|
||||||
|
* non-strict code;
|
||||||
|
* @description: Checking if execution of "interface = 1" succeeds in
|
||||||
|
* strict code;
|
||||||
|
*/
|
||||||
|
|
||||||
|
new Function('interface = 1');
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.19;
|
* @name: S7.5.3_A1.19;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "long" token can not be used as identifier;
|
* @assertion: The "long" token can be used as identifier;
|
||||||
* @description: Checking if execution of "long=1" fails;
|
* @description: Checking if execution of "long=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
long = 1;
|
long = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.2;
|
* @name: S7.5.3_A1.2;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "boolean" token can not be used as identifier;
|
* @assertion: The "boolean" token can be used as identifier;
|
||||||
* @description: Checking if execution of "boolean=1" fails;
|
* @description: Checking if execution of "boolean=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
boolean = 1;
|
boolean = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.20;
|
* @name: S7.5.3_A1.20;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "native" token can not be used as identifier;
|
* @assertion: The "native" token can be used as identifier;
|
||||||
* @description: Checking if execution of "native=1" fails;
|
* @description: Checking if execution of "native=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
native = 1;
|
native = 1;
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.21;
|
* @name: S7.5.3_A1.21;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "package" token can not be used as identifier;
|
* @assertion: The "package" token can not be used as identifier in
|
||||||
* @description: Checking if execution of "package=1" fails;
|
* strict code;
|
||||||
|
* @description: Checking if execution of "package=1" fails in strict code;
|
||||||
* @negative
|
* @negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
package = 1;
|
package = 1;
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S7.5.3_A1.21;
|
||||||
|
* @section: 7.5.3;
|
||||||
|
* @assertion: The "package" token can be used as identifier in
|
||||||
|
* non-strict code;
|
||||||
|
* @description: Checking if execution of "package=1" succeeds in
|
||||||
|
* non-strict code;
|
||||||
|
*/
|
||||||
|
|
||||||
|
new Function('package = 1');
|
@ -4,9 +4,11 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.22;
|
* @name: S7.5.3_A1.22;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "private" token can not be used as identifier;
|
* @assertion: The "private" token can not be used as identifier in
|
||||||
* @description: Checking if execution of "private=1" fails;
|
* strict code;
|
||||||
|
* @description: Checking if execution of "private=1" fails in strict code;
|
||||||
* @negative
|
* @negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
private = 1;
|
private = 1;
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S7.5.3_A1.22;
|
||||||
|
* @section: 7.5.3;
|
||||||
|
* @assertion: The "private" token can be used as identifier in
|
||||||
|
* non-strict code;
|
||||||
|
* @description: Checking if execution of "private=1" succeeds in
|
||||||
|
* non-strict code;
|
||||||
|
*/
|
||||||
|
|
||||||
|
new Function('private = 1');
|
@ -4,9 +4,12 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.23;
|
* @name: S7.5.3_A1.23;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "protected" token can not be used as identifier;
|
* @assertion: The "protected" token can not be used as identifier in
|
||||||
* @description: Checking if execution of "protected=1" fails;
|
* strict code;
|
||||||
|
* @description: Checking if execution of "protected=1" fails in
|
||||||
|
* strict code;
|
||||||
* @negative
|
* @negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
protected = 1;
|
protected = 1;
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S7.5.3_A1.23;
|
||||||
|
* @section: 7.5.3;
|
||||||
|
* @assertion: The "protected" token can be used as identifier in
|
||||||
|
* non-strict code;
|
||||||
|
* @description: Checking if execution of "protected=1" succeeds in
|
||||||
|
* non-strict code;
|
||||||
|
*/
|
||||||
|
|
||||||
|
new Function('protected = 1');
|
@ -4,9 +4,11 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.24;
|
* @name: S7.5.3_A1.24;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "public" token can not be used as identifier;
|
* @assertion: The "public" token can not be used as identifier in
|
||||||
* @description: Checking if execution of "public=1" fails;
|
* strict code;
|
||||||
|
* @description: Checking if execution of "public=1" fails in strict code;
|
||||||
* @negative
|
* @negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
public = 1;
|
public = 1;
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S7.5.3_A1.24;
|
||||||
|
* @section: 7.5.3;
|
||||||
|
* @assertion: The "public" token can be used as identifier in
|
||||||
|
* non-strict code;
|
||||||
|
* @description: Checking if execution of "public=1" succeeds in
|
||||||
|
* non-strict code;
|
||||||
|
*/
|
||||||
|
|
||||||
|
new Function('public = 1');
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.25;
|
* @name: S7.5.3_A1.25;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "short" token can not be used as identifier;
|
* @assertion: The "short" token can be used as identifier;
|
||||||
* @description: Checking if execution of "short=1" fails;
|
* @description: Checking if execution of "short=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
short = 1;
|
short = 1;
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.26;
|
* @name: S7.5.3_A1.26;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "static" token can not be used as identifier;
|
* @assertion: The "static" token can not be used as identifier in
|
||||||
* @description: Checking if execution of "static=1" fails;
|
* strict code;
|
||||||
|
* @description: Checking if execution of "static=1" fails in strict code;
|
||||||
* @negative
|
* @negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
static = 1;
|
static = 1;
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S7.5.3_A1.26;
|
||||||
|
* @section: 7.5.3;
|
||||||
|
* @assertion: The "static" token can be used as identifier in
|
||||||
|
* non-strict code;
|
||||||
|
* @description: Checking if execution of "static=1" succeeds in
|
||||||
|
* non-strict code;
|
||||||
|
*/
|
||||||
|
|
||||||
|
new Function('static = 1');
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.28;
|
* @name: S7.5.3_A1.28;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "synchronized" token can not be used as identifier;
|
* @assertion: The "synchronized" token can be used as identifier;
|
||||||
* @description: Checking if execution of "synchronized=1" fails;
|
* @description: Checking if execution of "synchronized=1" succeeds;
|
||||||
* @negative
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
synchronized = 1;
|
synchronized = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.29;
|
* @name: S7.5.3_A1.29;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "throws" token can not be used as identifier;
|
* @assertion: The "throws" token can be used as identifier;
|
||||||
* @description: Checking if execution of "throws=1" fails;
|
* @description: Checking if execution of "throws=1" succeeds;
|
||||||
* @negative
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
throws = 1;
|
throws = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.3;
|
* @name: S7.5.3_A1.3;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "byte" token can not be used as identifier;
|
* @assertion: The "byte" token can be used as identifier;
|
||||||
* @description: Checking if execution of "byte=1" fails;
|
* @description: Checking if execution of "byte=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
byte = 1;
|
byte = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.30;
|
* @name: S7.5.3_A1.30;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "transient" token can not be used as identifier;
|
* @assertion: The "transient" token can be used as identifier;
|
||||||
* @description: Checking if execution of "transient=1" fails;
|
* @description: Checking if execution of "transient=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
transient = 1;
|
transient = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.31;
|
* @name: S7.5.3_A1.31;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "volatile" token can not be used as identifier;
|
* @assertion: The "volatile" token can be used as identifier;
|
||||||
* @description: Checking if execution of "volatile=1" fails;
|
* @description: Checking if execution of "volatile=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
volatile = 1;
|
volatile = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.4;
|
* @name: S7.5.3_A1.4;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "char" token can not be used as identifier;
|
* @assertion: The "char" token can be used as identifier;
|
||||||
* @description: Checking if execution of "char=1" fails;
|
* @description: Checking if execution of "char=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
char = 1;
|
char = 1;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S7.5.3_A1.8;
|
* @name: S7.5.3_A1.8;
|
||||||
* @section: 7.5.3;
|
* @section: 7.5.3;
|
||||||
* @assertion: The "double" token can not be used as identifier;
|
* @assertion: The "double" token can be used as identifier;
|
||||||
* @description: Checking if execution of "double=1" fails;
|
* @description: Checking if execution of "double=1" succeeds;
|
||||||
* @negative
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
double = 1;
|
double = 1;
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.2_A12;
|
||||||
|
* @section: 15.2.4.2;
|
||||||
|
* @assertion: If the this value is undefined, return "[object Undefined]".
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Object.prototype.toString.call(undefined) !== "[object Undefined]") {
|
||||||
|
$ERROR('If the this value is undefined, return "[object Undefined]".');
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.2_A13;
|
||||||
|
* @section: 15.2.4.2;
|
||||||
|
* @assertion: If the this value is null, return "[object Null]".
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Object.prototype.toString.call(null) !== "[object Null]") {
|
||||||
|
$ERROR('If the this value is null, return "[object Null]".');
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.2_A14;
|
||||||
|
* @section: 15.2.4.2;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Object.prototype.toString.call(33) !== "[object Number]") {
|
||||||
|
$ERROR('Let O be the result of calling ToObject passing the this ' +
|
||||||
|
'value as the argument.');
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.2_A15;
|
||||||
|
* @section: 15.2.4.2;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Object.prototype.toString.call(true) !== "[object Boolean]") {
|
||||||
|
$ERROR('Let O be the result of calling ToObject passing the this ' +
|
||||||
|
'value as the argument.');
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.2_A16;
|
||||||
|
* @section: 15.2.4.2;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Object.prototype.toString.call('foo') !== "[object String]") {
|
||||||
|
$ERROR('Let O be the result of calling ToObject passing the this ' +
|
||||||
|
'value as the argument.');
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.3_A12;
|
||||||
|
* @section: 15.2.4.3;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.toLocaleString.call(undefined);
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.3_A13;
|
||||||
|
* @section: 15.2.4.3;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.toLocaleString.call(null);
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.4_A12;
|
||||||
|
* @section: 15.2.4.4;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.toLocaleString.call(undefined);
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.4_A13;
|
||||||
|
* @section: 15.2.4.4;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.toLocaleString.call(null);
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.5_A12;
|
||||||
|
* @section: 15.2.4.5;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.hasOwnProperty.call(undefined, 'foo');
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.5_A13;
|
||||||
|
* @section: 15.2.4.5;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.hasOwnProperty.call(null, 'foo');
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.6_A12;
|
||||||
|
* @section: 15.2.4.6;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.isPrototypeOf.call(undefined, {});
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.6_A13;
|
||||||
|
* @section: 15.2.4.6;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.isPrototypeOf.call(null, {});
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.7_A12;
|
||||||
|
* @section: 15.2.4.7;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.propertyIsEnumerable.call(undefined, 'foo');
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2011 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name: S15.2.4.7_A13;
|
||||||
|
* @section: 15.2.4.7;
|
||||||
|
* @assertion: Let O be the result of calling ToObject passing the this
|
||||||
|
* value as the argument.
|
||||||
|
* @negative
|
||||||
|
*/
|
||||||
|
|
||||||
|
Object.prototype.propertyIsEnumerable.call(null, 'foo');
|
@ -4,14 +4,12 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S15.3.4_A1;
|
* @name: S15.3.4_A1;
|
||||||
* @section: 15.3.4;
|
* @section: 15.3.4;
|
||||||
* @assertion: The Function prototype object is itself a Function object (its [[Class]] is "Function");
|
* @assertion: The Function prototype object is itself a Function
|
||||||
* @description: first we delete Function.prototype.toString cause it overrides Object prototype toString.
|
* object (its [[Class]] is "Function");
|
||||||
* Object.prototype.toString returns [object+[[class]]+];
|
* @description: Object.prototype.toString returns [object+[[Class]]+];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
delete Function.prototype.toString;
|
if (Object.prototype.toString.call(Function.prototype) !== "[object Function]") {
|
||||||
|
$ERROR('#2: The Function prototype object is itself a Function ' +
|
||||||
//CHECK#1
|
'object (its [[Class]] is "Function") (15.3.4)');
|
||||||
if (Function.prototype.toString() !== "[object "+"Function"+"]") {
|
|
||||||
$ERROR('#1: The Function prototype object is itself a Function object (its [[Class]] is "Function")');
|
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,15 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name: S15.3.4_A3_T1;
|
* @name: S15.3.4_A3_T1;
|
||||||
* @section: 15.3.4, 15.3.2.1;
|
* @section: 15.3.4;
|
||||||
* @assertion: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1);
|
* @assertion: The value of the internal [[Prototype]] property of the
|
||||||
|
* Function prototype object is the Object prototype object
|
||||||
|
* (15.3.4);
|
||||||
* @description: Checking prototype of Function.prototype;
|
* @description: Checking prototype of Function.prototype;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//CHECK#1
|
if (Object.getPrototypeOf(Function.prototype) !== Object.prototype) {
|
||||||
if (!(Object.prototype.isPrototypeOf(Function.prototype))) {
|
$ERROR('#1: The value of the internal [[Prototype]] property of ' +
|
||||||
$ERROR('#1: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)');
|
'the Function prototype object is the Object prototype ' +
|
||||||
}
|
'object (15.3.4)');
|
||||||
|
|
||||||
delete Function.prototype.toString;
|
|
||||||
|
|
||||||
//CHECK#2
|
|
||||||
if (Function.prototype.toString() !== "[object "+"Function"+"]") {
|
|
||||||
$ERROR('#2: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)');
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S15.3.5.1_A1_T1;
|
* @name: S15.3.5.1_A1_T1;
|
||||||
* @section: 15.3.5.1;
|
* @section: 15.3.5.1;
|
||||||
* @assertion: The value of the length property is usually an integer that indicates the 'typical' number of arguments expected by the function;
|
* @assertion: The value of the length property is usually an integer
|
||||||
|
* that indicates the 'typical' number of arguments
|
||||||
|
* expected by the function;
|
||||||
* @description: Checking length property of Function("arg1,arg2,arg3", null);
|
* @description: Checking length property of Function("arg1,arg2,arg3", null);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -4,17 +4,12 @@
|
|||||||
/**
|
/**
|
||||||
* @name: S15.3.5_A1_T1;
|
* @name: S15.3.5_A1_T1;
|
||||||
* @section: 15.3.5;
|
* @section: 15.3.5;
|
||||||
* @assertion: The value of the [[Class]] property is "Function" ;
|
* @assertion: The value of the [[Class]] property is "Function";
|
||||||
* @description: We delete Function.prototype.toString method to access Object.prototype.toString method.
|
* @description: For testing use variable f = new Function;
|
||||||
* For testing use variable f = new Function;
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
f = new Function;
|
var f = new Function;
|
||||||
|
|
||||||
delete Function.prototype.toString;
|
if (Object.prototype.toString.call(f) !== "[object Function]") {
|
||||||
|
|
||||||
//CHECK#1
|
|
||||||
if (f.toString() !== "[object "+"Function"+"]") {
|
|
||||||
$ERROR('#1: The value of the [[Class]] property is "Function"');
|
$ERROR('#1: The value of the [[Class]] property is "Function"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,16 +5,12 @@
|
|||||||
* @name: S15.3.5_A1_T2;
|
* @name: S15.3.5_A1_T2;
|
||||||
* @section: 15.3.5;
|
* @section: 15.3.5;
|
||||||
* @assertion: The value of the [[Class]] property is "Function" ;
|
* @assertion: The value of the [[Class]] property is "Function" ;
|
||||||
* @description: We delete Function.prototype.toString method to access Object.prototype.toString method
|
* @description: For testing use variable f = Function();
|
||||||
* For testing use variable f = Function();
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
f = Function();
|
var f = Function();
|
||||||
|
|
||||||
delete Function.prototype.toString;
|
if (Object.prototype.toString.call(f) !== "[object Function]") {
|
||||||
|
|
||||||
//CHECK#1
|
|
||||||
if (f.toString() !== "[object "+"Function"+"]") {
|
|
||||||
$ERROR('#1: The value of the [[Class]] property is "Function"');
|
$ERROR('#1: The value of the [[Class]] property is "Function"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,15 +3,13 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name: S15.4.4_A1.1_T2;
|
* @name: S15.4.4_A1.1_T2;
|
||||||
* @section: 15.4.4, 11.4.1;
|
* @section: 15.4.4;
|
||||||
* @assertion: The value of the internal [[Prototype]] property of
|
* @assertion:The Array prototype object is itself an array; its
|
||||||
* the Array prototype object is the Object prototype object;
|
* [[Class]] is "Array",
|
||||||
* @description: delete Array.prototype.toString;
|
|
||||||
* @strict_mode_negative
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
delete Array.prototype.toString;
|
if (Object.prototype.toString.call(Array.prototype) !== "[object Array]") {
|
||||||
if (Array.prototype.toString() !== "[object " + "Array" + "]") {
|
$ERROR('The Array prototype object is itself an array; its' +
|
||||||
$ERROR('#1: delete Array.prototype.toString; var Array.prototype = Object(); Array.prototype.toString() === "[object " + "Array" + "]". Actual: ' + (Array.prototype.toString()));
|
'[[Class]] is "Array".');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user