Bug 1515224 - Part 2: Remove test files for BinTokenReaderTester. r=Yoric

Depends on D14934

Differential Revision: https://phabricator.services.mozilla.com/D14936

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tooru Fujisawa 2018-12-19 13:57:10 +00:00
Родитель a0488e6e87
Коммит b8ac1952ca
396 изменённых файлов: 0 добавлений и 10849 удалений

Двоичный файл не отображается.

Просмотреть файл

@ -1,47 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: boolean-001.js
Description: Corresponds to ecma/Boolean/15.6.4.2-4-n.js
The toString function is not generic; it generates
a runtime error if its this value is not a Boolean
object. Therefore it cannot be transferred to other
kinds of objects for use as a method.
Author: christine@netscape.com
Date: june 27, 1997
*/
var SECTION = "boolean-001.js";
var VERSION = "JS1_4";
var TITLE = "Boolean.prototype.toString()";
startTest();
writeHeaderToLog( SECTION +" "+ TITLE );
var exception = "No exception thrown";
var result = "Failed";
var TO_STRING = Boolean.prototype.toString;
try {
var s = new String("Not a Boolean");
s.toString = TO_STRING;
s.toString();
} catch ( e ) {
result = "Passed!";
exception = e.toString();
}
new TestCase(
SECTION,
"Assigning Boolean.prototype.toString to a String object "+
"(threw " +exception +")",
"Passed!",
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,51 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: boolean-001.js
Description: Corresponds to ecma/Boolean/15.6.4.3-4-n.js
15.6.4.3 Boolean.prototype.valueOf()
Returns this boolean value.
The valueOf function is not generic; it generates
a runtime error if its this value is not a Boolean
object. Therefore it cannot be transferred to other
kinds of objects for use as a method.
Author: christine@netscape.com
Date: 09 september 1998
*/
var SECTION = "boolean-002.js";
var VERSION = "JS1_4";
var TITLE = "Boolean.prototype.valueOf()";
startTest();
writeHeaderToLog( SECTION +" "+ TITLE );
var exception = "No exception thrown";
var result = "Failed";
var VALUE_OF = Boolean.prototype.valueOf;
try {
var s = new String("Not a Boolean");
s.valueOf = VALUE_0F;
s.valueOf();
} catch ( e ) {
result = "Passed!";
exception = e.toString();
}
new TestCase(
SECTION,
"Assigning Boolean.prototype.valueOf to a String object "+
"(threw " +exception +")",
"Passed!",
result );
test();

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -1,54 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: date-002.js
Corresponds To: 15.9.5.23-3-n.js
ECMA Section: 15.9.5.23
Description: Date.prototype.setTime
1. If the this value is not a Date object, generate a runtime error.
2. Call ToNumber(time).
3. Call TimeClip(Result(1)).
4. Set the [[Value]] property of the this value to Result(2).
5. Return the value of the [[Value]] property of the this value.
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "date-002";
var VERSION = "JS1_4";
var TITLE = "Date.prototype.setTime()";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
var MYDATE = new MyDate();
result = MYDATE.setTime(0);
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"MYDATE = new MyDate(); MYDATE.setTime(0)" +
" (threw " + exception +")",
expect,
result );
test();
function MyDate(value) {
this.value = value;
this.setTime = Date.prototype.setTime;
return this;
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,56 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: date-003.js
Corresponds To 15.9.5.3-1.js
ECMA Section: 15.9.5.3-1 Date.prototype.valueOf
Description:
The valueOf function returns a number, which is this time value.
The valueOf function is not generic; it generates a runtime error if
its this value is not a Date object. Therefore it cannot be transferred
to other kinds of objects for use as a method.
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "date-003";
var VERSION = "JS1_4";
var TITLE = "Date.prototype.valueOf";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
var OBJ = new MyObject( new Date(0) );
result = OBJ.valueOf();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"OBJ = new MyObject( new Date(0)); OBJ.valueOf()" +
" (threw " + exception +")",
expect,
result );
test();
function MyObject( value ) {
this.value = value;
this.valueOf = Date.prototype.valueOf;
// The following line causes an infinte loop
// this.toString = new Function( "return this+\"\";");
return this;
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,50 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: date-004.js
Corresponds To: 15.9.5.4-2-n.js
ECMA Section: 15.9.5.4-1 Date.prototype.getTime
Description:
1. If the this value is not an object whose [[Class]] property is "Date",
generate a runtime error.
2. Return this time value.
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "date-004";
var VERSION = "JS1_4";
var TITLE = "Date.prototype.getTime";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
var MYDATE = new MyDate();
result = MYDATE.getTime();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"MYDATE = new MyDate(); MYDATE.getTime()" +
" (threw " + exception +")",
expect,
result );
test();
function MyDate( value ) {
this.value = value;
this.getTime = Date.prototype.getTime;
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-001
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* Call error.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-001";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: CallError";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
Call_1();
test();
function Call_1() {
result = "failed: no exception thrown";
exception = null;
try {
Math();
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"Math() [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-002
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* Construct error.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-002";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: ConstructError";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
Construct_1();
test();
function Construct_1() {
result = "failed: no exception thrown";
exception = null;
try {
result = new Math();
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"new Math() [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,49 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-003
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* Target error.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-003";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: TargetError";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
Target_1();
test();
function Target_1() {
result = "failed: no exception thrown";
exception = null;
try {
string = new String("hi");
string.toString = Boolean.prototype.toString;
string.toString();
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"string = new String(\"hi\");"+
"string.toString = Boolean.prototype.toString" +
"string.toString() [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-004
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* ToObject error.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-004";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: ToObjectError";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
ToObject_1();
test();
function ToObject_1() {
result = "failed: no exception thrown";
exception = null;
try {
result = foo["bar"];
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"foo[\"bar\"] [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-005
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* ToObject error.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-005";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: ToObjectError";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
ToObject_1();
test();
function ToObject_1() {
result = "failed: no exception thrown";
exception = null;
try {
result = foo["bar"];
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"foo[\"bar\"] [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,56 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-006
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* ToPrimitive error.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-006";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: TypeError";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
ToPrimitive_1();
test();
/**
* Getting the [[DefaultValue]] of any instances of MyObject
* should result in a runtime error in ToPrimitive.
*/
function MyObject() {
this.toString = void 0;
this.valueOf = void 0;
}
function ToPrimitive_1() {
result = "failed: no exception thrown";
exception = null;
try {
result = new MyObject() + new MyObject();
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"new MyObject() + new MyObject() [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,57 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-007
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* DefaultValue error.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-007";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: TypeError";
var BUGNUMBER="318250";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
DefaultValue_1();
test();
/**
* Getting the [[DefaultValue]] of any instances of MyObject
* should result in a runtime error in ToPrimitive.
*/
function MyObject() {
this.toString = void 0;
this.valueOf = new Object();
}
function DefaultValue_1() {
result = "failed: no exception thrown";
exception = null;
try {
result = new MyObject() + new MyObject();
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"new MyObject() + new MyObject() [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,44 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-008
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* SyntaxError.
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-008";
var VERSION = "js1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
Syntax_1();
test();
function Syntax_1() {
result = "failed: no exception thrown";
exception = null;
try {
result = eval("continue;");
} catch ( e ) {
result = "passed: threw exception",
exception = e.toString();
} finally {
new TestCase(
SECTION,
"eval(\"continue\") [ exception is " + exception +" ]",
"passed: threw exception",
result );
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,53 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: exception-009
* ECMA Section:
* Description: Tests for JavaScript Standard Exceptions
*
* Regression test for nested try blocks.
*
* http://scopus.mcom.com/bugsplat/show_bug.cgi?id=312964
*
* Author: christine@netscape.com
* Date: 31 August 1998
*/
var SECTION = "exception-009";
var VERSION = "JS1_4";
var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError";
var BUGNUMBER= "312964";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
try {
expect = "passed: no exception thrown";
result = expect;
Nested_1();
} catch ( e ) {
result = "failed: threw " + e;
} finally {
new TestCase(
SECTION,
"nested try",
expect,
result );
}
test();
function Nested_1() {
try {
try {
} catch (a) {
} finally {
}
} catch (b) {
} finally {
}
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,25 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var SECTION = "exception-010";
var VERSION = "ECMA_2";
startTest();
var TITLE = "Don't Crash throwing null";
writeHeaderToLog( SECTION + " "+ TITLE);
print("Null throw test.");
print("BUGNUMBER: 21799");
DESCRIPTION = "throw null";
EXPECTED = "error";
new TestCase( SECTION, "throw null", "error", eval("throw null" ));
test();
print("FAILED!: Should have exited with uncaught exception.");

Двоичный файл не отображается.

Просмотреть файл

@ -1,26 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var SECTION = "exception-011";
var VERSION = "ECMA_2";
startTest();
var TITLE = "Don't Crash throwing undefined";
writeHeaderToLog( SECTION + " "+ TITLE);
print("Undefined throw test.");
DESCRIPTION = "throw undefined";
EXPECTED = "error";
new TestCase( SECTION, "throw undefined", "error", eval("throw (void 0)") );
test();
print("FAILED!: Should have exited with uncaught exception.");

Двоичный файл не отображается.

Просмотреть файл

@ -1,50 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-001.js
Corresponds to: ecma/Expressions/11.12-2-n.js
ECMA Section: 11.12
Description:
The grammar for a ConditionalExpression in ECMAScript is a little bit
different from that in C and Java, which each allow the second
subexpression to be an Expression but restrict the third expression to
be a ConditionalExpression. The motivation for this difference in
ECMAScript is to allow an assignment expression to be governed by either
arm of a conditional and to eliminate the confusing and fairly useless
case of a comma expression as the center expression.
Author: christine@netscape.com
Date: 09 september 1998
*/
var SECTION = "expression-001";
var VERSION = "JS1_4";
var TITLE = "Conditional operator ( ? : )"
startTest();
writeHeaderToLog( SECTION + " " + TITLE );
// the following expression should be an error in JS.
var result = "Failed"
var exception = "No exception was thrown";
try {
eval("var MY_VAR = true ? \"EXPR1\", \"EXPR2\" : \"EXPR3\"");
} catch ( e ) {
result = "Passed";
exception = e.toString();
}
new TestCase(
SECTION,
"comma expression in a conditional statement "+
"(threw "+ exception +")",
"Passed",
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,60 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expressions-002.js
Corresponds to: ecma/Expressions/11.2.1-3-n.js
ECMA Section: 11.2.1 Property Accessors
Description:
Try to access properties of an object whose value is undefined.
Author: christine@netscape.com
Date: 09 september 1998
*/
var SECTION = "expressions-002.js";
var VERSION = "JS1_4";
var TITLE = "Property Accessors";
writeHeaderToLog( SECTION + " "+TITLE );
startTest();
// go through all Native Function objects, methods, and properties and get their typeof.
var PROPERTY = new Array();
var p = 0;
// try to access properties of primitive types
OBJECT = new Property( "undefined", void 0, "undefined", NaN );
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = OBJECT.value.valueOf();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"Get the value of an object whose value is undefined "+
"(threw " + exception +")",
expect,
result );
test();
function Property( object, value, string, number ) {
this.object = object;
this.string = String(value);
this.number = Number(value);
this.valueOf = value;
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,55 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expressions-003.js
Corresponds to: ecma/Expressions/11.2.1-3-n.js
ECMA Section: 11.2.1 Property Accessors
Description:
Try to access properties of an object whose value is undefined.
Author: christine@netscape.com
Date: 09 september 1998
*/
var SECTION = "expressions-003.js";
var VERSION = "JS1_4";
var TITLE = "Property Accessors";
writeHeaderToLog( SECTION + " "+TITLE );
startTest();
// try to access properties of primitive types
OBJECT = new Property( "undefined", void 0, "undefined", NaN );
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = OBJECT.value.toString();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"Get the toString value of an object whose value is undefined "+
"(threw " + exception +")",
expect,
result );
test();
function Property( object, value, string, number ) {
this.object = object;
this.string = String(value);
this.number = Number(value);
this.value = value;
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,49 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-004.js
Corresponds To: 11.2.1-4-n.js
ECMA Section: 11.2.1 Property Accessors
Description:
Author: christine@netscape.com
Date: 09 september 1998
*/
var SECTION = "expression-004";
var VERSION = "JS1_4";
var TITLE = "Property Accessors";
writeHeaderToLog( SECTION + " "+TITLE );
startTest();
var OBJECT = new Property( "null", null, "null", 0 );
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = OBJECT.value.toString();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"Get the toString value of an object whose value is null "+
"(threw " + exception +")",
expect,
result );
test();
function Property( object, value, string, number ) {
this.object = object;
this.string = String(value);
this.number = Number(value);
this.value = value;
}

Двоичный файл не отображается.

Просмотреть файл

@ -1,41 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-005.js
Corresponds To: 11.2.2-10-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-005";
var VERSION = "JS1_4";
var TITLE = "The new operator";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var expect = "Passed";
var exception = "No exception thrown";
try {
result = new Math();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"result= new Math() (threw " + exception + ")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,46 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-006.js
Corresponds to: 11.2.2-1-n.js
ECMA Section: 11.2.2. The new operator
Description:
http://scopus/bugsplat/show_bug.cgi?id=327765
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-006.js";
var VERSION = "JS1_4";
var TITLE = "The new operator";
var BUGNUMBER="327765";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
var OBJECT = new Object();
result = new OBJECT();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"OBJECT = new Object; result = new OBJECT()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,44 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-007.js
Corresponds To: 11.2.2-2-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-007";
var VERSION = "JS1_4";
var TITLE = "The new operator";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
UNDEFINED = void 0;
result = new UNDEFINED();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"UNDEFINED = void 0; result = new UNDEFINED()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,41 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-008
Corresponds To: 11.2.2-3-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-008";
var VERSION = "JS1_4";
var TITLE = "The new operator";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var NULL = null;
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = new NULL();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"NULL = null; result = new NULL()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,42 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-009
Corresponds to: ecma/Expressions/11.2.2-4-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-009";
var VERSION = "JS1_4";
var TITLE = "The new operator";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var STRING = "";
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = new STRING();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"STRING = ''; result = new STRING()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,43 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-010.js
Corresponds To: 11.2.2-5-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-010";
var VERSION = "JS1_4";
var TITLE = "The new operator";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var NUMBER = 0;
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = new NUMBER();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"NUMBER=0, result = new NUMBER()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,43 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-011.js
Corresponds To: ecma/Expressions/11.2.2-6-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-011";
var VERSION = "JS1_4";
var TITLE = "The new operator";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var BOOLEAN = true;
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
var OBJECT = new BOOLEAN();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"BOOLEAN = true; result = new BOOLEAN()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,44 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-012.js
Corresponds To: ecma/Expressions/11.2.2-6-n.js
ECMA Section: 11.2.2. The new operator
Description:
http://scopus/bugsplat/show_bug.cgi?id=327765
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-012";
var VERSION = "JS1_4";
var TITLE = "The new operator";
var BUGNUMBER= "327765";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var STRING = new String("hi");
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = new STRING();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"STRING = new String(\"hi\"); result = new STRING()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,44 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-013.js
Corresponds To: ecma/Expressions/11.2.2-8-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-013";
var VERSION = "JS1_4";
var TITLE = "The new operator";
var BUGNUMBER= "327765";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var NUMBER = new Number(1);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = new NUMBER();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"NUMBER = new Number(1); result = new NUMBER()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,46 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-014.js
Corresponds To: ecma/Expressions/11.2.2-9-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-014.js";
var VERSION = "ECMA_1";
var TITLE = "The new operator";
var BUGNUMBER= "327765";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var BOOLEAN = new Boolean();
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = new BOOLEAN();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"BOOLEAN = new Boolean(); result = new BOOLEAN()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,40 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-015.js
Corresponds To: ecma/Expressions/11.2.3-2-n.js
ECMA Section: 11.2.3. Function Calls
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-015";
var VERSION = "JS1_4";
var TITLE = "Function Calls";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("result = 3.valueOf();");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"3.valueOf()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,40 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-016.js
Corresponds To: ecma/Expressions/11.2.3-3-n.js
ECMA Section: 11.2.3. Function Calls
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-016";
var VERSION = "JS1_4";
var TITLE = "Function Calls";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = (void 0).valueOf();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"(void 0).valueOf()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,40 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-07.js
Corresponds To: ecma/Expressions/11.2.3-4-n.js
ECMA Section: 11.2.3. Function Calls
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-017";
var VERSION = "JS1_4";
var TITLE = "Function Calls";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = nullvalueOf();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"null.valueOf()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,44 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: expression-019.js
Corresponds To: 11.2.2-7-n.js
ECMA Section: 11.2.2. The new operator
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "expression-019";
var VERSION = "JS1_4";
var TITLE = "The new operator";
var BUGNUMBER= "327765";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
var STRING = new String("hi");
result = new STRING();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"var STRING = new String(\"hi\"); result = new STRING();" +
" (threw " + exception + ")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,53 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* File Name: boolean-001.js
* Description:
*
* http://scopus.mcom.com/bugsplat/show_bug.cgi?id=99232
*
* eval("function f(){}function g(){}") at top level is an error for JS1.2
* and above (missing ; between named function expressions), but declares f
* and g as functions below 1.2.
*
* Fails to produce error regardless of version:
* js> version(100)
* 120
* js> eval("function f(){}function g(){}")
* js> version(120);
* 100
* js> eval("function f(){}function g(){}")
* js>
* Author: christine@netscape.com
* Date: 11 August 1998
*/
var SECTION = "function-001.js";
var VERSION = "JS_12";
var TITLE = "functions not separated by semicolons are errors in version 120 and higher";
var BUGNUMBER="10278";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "pass";
var exception = "no exception thrown";
try {
eval("function f(){}function g(){}");
} catch ( e ) {
result = "fail";
exception = e.toString();
}
new TestCase(
SECTION,
"eval(\"function f(){}function g(){}\") (threw "+exception,
"pass",
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: global-001
Corresponds To: ecma/GlobalObject/15.1-1-n.js
ECMA Section: The global object
Description:
The global object does not have a [[Construct]] property; it is not
possible to use the global object as a constructor with the new operator.
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "global-001";
var VERSION = "ECMA_1";
var TITLE = "The Global Object";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = new this();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"result = new this()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: global-002
Corresponds To: ecma/GlobalObject/15.1-2-n.js
ECMA Section: The global object
Description:
The global object does not have a [[Construct]] property; it is not
possible to use the global object as a constructor with the new operator.
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "global-002";
var VERSION = "JS1_4";
var TITLE = "The Global Object";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = this();
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"result = this()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,52 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-001.js
CorrespondsTo: ecma/LexicalConventions/7.2.js
ECMA Section: 7.2 Line Terminators
Description: - readability
- separate tokens
- may occur between any two tokens
- cannot occur within any token, not even a string
- affect the process of automatic semicolon insertion.
white space characters are:
unicode name formal name string representation
\u000A line feed <LF> \n
\u000D carriage return <CR> \r
this test uses onerror to capture line numbers. because
we use on error, we can only have one test case per file.
Author: christine@netscape.com
Date: 11 september 1997
*/
var SECTION = "lexical-001";
var VERSION = "JS1_4";
var TITLE = "Line Terminators";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = eval("\r\n\expect");
} catch ( e ) {
exception = e.toString();
}
new TestCase(
SECTION,
"OBJECT = new Object; result = new OBJECT()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,52 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-002.js
Corresponds To: ecma/LexicalConventions/7.2-3-n.js
ECMA Section: 7.2 Line Terminators
Description: - readability
- separate tokens
- may occur between any two tokens
- cannot occur within any token, not even a string
- affect the process of automatic semicolon insertion.
white space characters are:
unicode name formal name string representation
\u000A line feed <LF> \n
\u000D carriage return <CR> \r
this test uses onerror to capture line numbers. because
we use on error, we can only have one test case per file.
Author: christine@netscape.com
Date: 11 september 1997
*/
var SECTION = "lexical-002";
var VERSION = "JS1_4";
var TITLE = "Line Terminators";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
result = eval("\r\n\expect");
} catch ( e ) {
exception = e.toString();
}
new TestCase(
SECTION,
"result=eval(\"\r\nexpect\")" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,43 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-003.js
Corresponds To: 7.3-13-n.js
ECMA Section: 7.3 Comments
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-003.js";
var VERSION = "JS1_4";
var TITLE = "Comments";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("/*\n/* nested comment */\n*/\n");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"/*/*nested comment*/ */" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,52 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-004.js
Corresponds To: ecma/LexicalExpressions/7.4.1-1-n.js
ECMA Section: 7.4.1
Description:
Reserved words cannot be used as identifiers.
ReservedWord ::
Keyword
FutureReservedWord
NullLiteral
BooleanLiteral
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-004";
var VERSION = "JS1_4";
var TITLE = "Keywords";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("var null = true;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"var null = true" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,52 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-005.js
Corresponds To: 7.4.1-2.js
ECMA Section: 7.4.1
Description:
Reserved words cannot be used as identifiers.
ReservedWord ::
Keyword
FutureReservedWord
NullLiteral
BooleanLiteral
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-005";
var VERSION = "JS1_4";
var TITLE = "Keywords";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("true = false;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"true = false" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,58 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-006.js
Corresponds To: 7.4.2-1.js
ECMA Section: 7.4.2
Description:
The following tokens are ECMAScript keywords and may not be used as
identifiers in ECMAScript programs.
Syntax
Keyword :: one of
break for new var
continue function return void
delete if this while
else in typeof with
This test verifies that the keyword cannot be used as an identifier.
Functioinal tests of the keyword may be found in the section corresponding
to the function of the keyword.
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-006";
var VERSION = "JS1_4";
var TITLE = "Keywords";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("break = new Object();");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"break = new Object()" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,51 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-005.js
Corresponds To: 7.4.1-3-n.js
ECMA Section: 7.4.1
Description:
Reserved words cannot be used as identifiers.
ReservedWord ::
Keyword
FutureReservedWord
NullLiteral
BooleanLiteral
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-005";
var VERSION = "JS1_4";
var TITLE = "Keywords";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("false = true;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"false = true" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,53 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-008.js
Corresponds To: 7.4.3-1-n.js
ECMA Section: 7.4.3
Description:
The following words are used as keywords in proposed extensions and are
therefore reserved to allow for the possibility of future adoption of
those extensions.
FutureReservedWord :: one of
case debugger export super
catch default extends switch
class do finally throw
const enum import try
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-008.js";
var VERSION = "JS1_4";
var TITLE = "Future Reserved Words";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("case = true;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"case = true" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,53 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-009
Corresponds To: 7.4.3-2-n.js
ECMA Section: 7.4.3
Description:
The following words are used as keywords in proposed extensions and are
therefore reserved to allow for the possibility of future adoption of
those extensions.
FutureReservedWord :: one of
case debugger export super
catch default extends switch
class do finally throw
const enum import try
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-009";
var VERSION = "ECMA_1";
var TITLE = "Future Reserved Words";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("debugger = true;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"debugger = true" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,62 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-011.js
Corresponds To: 7.4.3-4-n.js
ECMA Section: 7.4.3
Description:
The following words are used as keywords in proposed extensions and are
therefore reserved to allow for the possibility of future adoption of
those extensions.
FutureReservedWord :: one of
case debugger export super
catch default extends switch
class do finally throw
const enum import try
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-011";
var VERSION = "JS1_4";
var TITLE = "Future Reserved Words";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
print("This test requires option javascript.options.strict enabled");
if (!options().match(/strict/))
{
options('strict');
}
if (!options().match(/werror/))
{
options('werror');
}
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("super = true;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"super = true" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,53 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-012.js
Corresponds To: 7.4.3-5-n.js
ECMA Section: 7.4.3
Description:
The following words are used as keywords in proposed extensions and are
therefore reserved to allow for the possibility of future adoption of
those extensions.
FutureReservedWord :: one of
case debugger export super
catch default extends switch
class do finally throw
const enum import try
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-012";
var VERSION = "JS1_4";
var TITLE = "Future Reserved Words";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("catch = true;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"catch = true" +
" (threw " + exception +")",
expect,
result );
test();

Двоичный файл не отображается.

Просмотреть файл

@ -1,53 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: lexical-013.js
Corresponds To: 7.4.3-6-n.js
ECMA Section: 7.4.3
Description:
The following words are used as keywords in proposed extensions and are
therefore reserved to allow for the possibility of future adoption of
those extensions.
FutureReservedWord :: one of
case debugger export super
catch default extends switch
class do finally throw
const enum import try
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "lexical-013";
var VERSION = "JS1_4";
var TITLE = "Future Reserved Words";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var result = "Failed";
var exception = "No exception thrown";
var expect = "Passed";
try {
eval("default = true;");
} catch ( e ) {
result = expect;
exception = e.toString();
}
new TestCase(
SECTION,
"default = true" +
" (threw " + exception +")",
expect,
result );
test();

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше