mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Re-gen'ed website.
This commit is contained in:
parent
68e437e708
commit
6c9436f977
@ -1,4 +1,4 @@
|
|||||||
/// Copyright (c) 2011 Microsoft Corporation
|
/// Copyright (c) 2011 Microsoft Corporation
|
||||||
///
|
///
|
||||||
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
/// that the following conditions are met:
|
/// that the following conditions are met:
|
||||||
@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
//Error Detector
|
//Error Detector
|
||||||
if (this.window!==undefined) { //for console support
|
if (this.window!==undefined) { //for console support
|
||||||
window.onerror = function(errorMsg, url, lineNumber) {
|
this.window.onerror = function(errorMsg, url, lineNumber) {
|
||||||
window.iframeError = errorMsg;
|
this.window.iframeError = errorMsg;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//This doesn't work with early errors in current versions of Opera
|
//This doesn't work with early errors in current versions of Opera
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/// Copyright (c) 2011 Microsoft Corporation
|
/// Copyright (c) 2011 Microsoft Corporation
|
||||||
///
|
///
|
||||||
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
/// that the following conditions are met:
|
/// that the following conditions are met:
|
||||||
@ -22,34 +22,62 @@
|
|||||||
|
|
||||||
//An exception is expected
|
//An exception is expected
|
||||||
if (testDescrip.negative !== undefined) {
|
if (testDescrip.negative !== undefined) {
|
||||||
//TODO - come up with a generic way of catching the error type from this.onerror
|
//TODO - come up with a generic way of catching the error type
|
||||||
|
//from this.onerror
|
||||||
testDescrip.negative = testDescrip.negative === "NotEarlyError" ?
|
testDescrip.negative = testDescrip.negative === "NotEarlyError" ?
|
||||||
testDescrip.negative : (testDescrip.negative === "^((?!NotEarlyError).)*$" ?
|
testDescrip.negative :
|
||||||
|
(testDescrip.negative === "^((?!NotEarlyError).)*$" ?
|
||||||
testDescrip.negative : ".");
|
testDescrip.negative : ".");
|
||||||
if (this.iframeError === undefined) { //no exception was thrown
|
if (this.iframeError === undefined) { //no exception was thrown
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
'fail',
|
'fail',
|
||||||
Error('No exception was thrown; expected an error "message" property matching the regular expression "' + testDescrip.negative + '".'));
|
Error('No exception was thrown; expected an error "message"' +
|
||||||
} else if (!(new RegExp(testDescrip.negative, "i").test(this.iframeError))) { //wrong type of exception thrown
|
' property matching the regular expression "' +
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testDescrip.negative + '".'));
|
||||||
|
} else if (!(new RegExp(testDescrip.negative,
|
||||||
|
"i").test(this.iframeError))) {
|
||||||
|
//wrong type of exception thrown
|
||||||
|
testRun(testDescrip.id,
|
||||||
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
'fail',
|
'fail',
|
||||||
Error('Expected an exception with a "message" property matching the regular expression "' + testDescrip.negative +'" to be thrown; actual was "' + this.iframeError + '".'));
|
Error('Expected an exception with a "message"' +
|
||||||
|
' property matching the regular expression "' +
|
||||||
|
testDescrip.negative +
|
||||||
|
'" to be thrown; actual was "' +
|
||||||
|
this.iframeError + '".'));
|
||||||
} else {
|
} else {
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
'pass', undefined);
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
|
'pass',
|
||||||
|
undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Exception was not expected to be thrown
|
//Exception was not expected to be thrown
|
||||||
else if (this.iframeError !== undefined) {
|
else if (this.iframeError !== undefined) {
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
'fail',
|
'fail',
|
||||||
Error('Unexpected exception, "' + this.iframeError + '" was thrown.'));
|
Error('Unexpected exception, "' +
|
||||||
|
this.iframeError + '" was thrown.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
'pass', undefined);
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
|
'pass',
|
||||||
|
undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
testFinished();
|
testFinished();
|
@ -1,4 +1,4 @@
|
|||||||
/// Copyright (c) 2009 Microsoft Corporation
|
/// Copyright (c) 2009 Microsoft Corporation
|
||||||
///
|
///
|
||||||
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
/// that the following conditions are met:
|
/// that the following conditions are met:
|
||||||
@ -335,8 +335,8 @@ function getPrecision(num) {
|
|||||||
//TODO: Create a table of prec's,
|
//TODO: Create a table of prec's,
|
||||||
// because using Math for testing Math isn't that correct.
|
// because using Math for testing Math isn't that correct.
|
||||||
|
|
||||||
log2num = Math.log(Math.abs(num)) / Math.LN2;
|
var log2num = Math.log(Math.abs(num)) / Math.LN2;
|
||||||
pernum = Math.ceil(log2num);
|
var pernum = Math.ceil(log2num);
|
||||||
return (2 * Math.pow(2, -52 + pernum));
|
return (2 * Math.pow(2, -52 + pernum));
|
||||||
//return(0);
|
//return(0);
|
||||||
}
|
}
|
||||||
@ -364,7 +364,7 @@ function isEqual(num1, num2) {
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
function ToInteger(p) {
|
function ToInteger(p) {
|
||||||
x = Number(p);
|
var x = Number(p);
|
||||||
|
|
||||||
if (isNaN(x)) {
|
if (isNaN(x)) {
|
||||||
return +0;
|
return +0;
|
||||||
@ -437,7 +437,7 @@ var $LocalTZ,
|
|||||||
current = new Date(current.getTime() + 1);
|
current = new Date(current.getTime() + 1);
|
||||||
}
|
}
|
||||||
return current;
|
return current;
|
||||||
}
|
};
|
||||||
|
|
||||||
var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0);
|
var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0);
|
||||||
var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0);
|
var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0);
|
||||||
@ -601,6 +601,7 @@ function DaysInMonth(m, leap) {
|
|||||||
|
|
||||||
function GetSundayInMonth(t, m, count){
|
function GetSundayInMonth(t, m, count){
|
||||||
var year = YearFromTime(t);
|
var year = YearFromTime(t);
|
||||||
|
var tempDate;
|
||||||
|
|
||||||
if (count==='"first"') {
|
if (count==='"first"') {
|
||||||
for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) {
|
for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) {
|
||||||
@ -905,6 +906,6 @@ return attribs
|
|||||||
//--Test case registration-----------------------------------------------------
|
//--Test case registration-----------------------------------------------------
|
||||||
function runTestCase(testcase) {
|
function runTestCase(testcase) {
|
||||||
if (testcase() !== true) {
|
if (testcase() !== true) {
|
||||||
$ERROR("Test case returned non-true value!")
|
$ERROR("Test case returned non-true value!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ function BrowserRunner() {
|
|||||||
idoc.writeln(globalScopeContents);
|
idoc.writeln(globalScopeContents);
|
||||||
idoc.writeln("</script>");
|
idoc.writeln("</script>");
|
||||||
idoc.close();
|
idoc.close();
|
||||||
}
|
};
|
||||||
|
|
||||||
//--Helper functions-------------------------------------------------------
|
//--Helper functions-------------------------------------------------------
|
||||||
this.convertForEval = function(txt) {
|
this.convertForEval = function(txt) {
|
||||||
@ -190,7 +190,7 @@ function BrowserRunner() {
|
|||||||
txt = txt.replace(/\r/g,"\\r");
|
txt = txt.replace(/\r/g,"\\r");
|
||||||
txt = txt.replace(/\n/g,"\\n");
|
txt = txt.replace(/\n/g,"\\n");
|
||||||
return txt;
|
return txt;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loads tests from the sections specified in testcases.json.
|
/* Loads tests from the sections specified in testcases.json.
|
||||||
@ -366,7 +366,7 @@ function Controller() {
|
|||||||
try {
|
try {
|
||||||
controller.implementerHook.finished(elapsed);
|
controller.implementerHook.finished(elapsed);
|
||||||
} catch(e) { /*no-op*/}
|
} catch(e) { /*no-op*/}
|
||||||
}
|
};
|
||||||
|
|
||||||
this.start = function() {
|
this.start = function() {
|
||||||
state = 'running';
|
state = 'running';
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"date":"2011-09-27","numTests":11028,"testSuite":["json/07_Lexical_Conventions.json","json/08_Types.json","json/09_Type_Conversion.json","json/10_Execution_Contexts.json","json/11.10_Binary_Bitwise_Operators.json","json/11.11_Binary_Logical_Operators.json","json/11.12_Conditional_Operator.json","json/11.13_Assignment_Operators.json","json/11.14_Comma_Operator.json","json/11.1_Primary_Expressions.json","json/11.2_Left_Hand_Side_Expressions.json","json/11.3_PostfixExpressions.json","json/11.4_Unary_Operators.json","json/11.5_Multiplicative_Operators.json","json/11.6_Additive_Operators.json","json/11.7_Bitwise_Shift_Operators.json","json/11.8_Relational_Operators.json","json/11.9_Equality_Operators.json","json/12_Statement.json","json/13_Function_Definition.json","json/14_Program.json","json/15.10_RegExp_Objects.json","json/15.11_Error_Objects.json","json/15.12_The_JSON_Object.json","json/15.1_The_Global_Object.json","json/15.2_Object_Objects.json","json/15.3_Function_Objects.json","json/15.4_Array_Objects.json","json/15.5_String_Objects.json","json/15.6_Boolean_Objects.json","json/15.7_Number_Objects.json","json/15.8_The_Math_Object.json","json/15.9_Date_Objects.json","json/chapter07.json","json/chapter08.json","json/chapter10.json","json/chapter11.json","json/chapter12.json","json/chapter13.json","json/chapter14.json","json/15.1.json","json/15.10.json","json/15.11.json","json/15.12.json","json/15.2.3.1.json","json/15.2.3.10.json","json/15.2.3.11.json","json/15.2.3.12.json","json/15.2.3.13.json","json/15.2.3.14.json","json/15.2.3.2.json","json/15.2.3.3.json","json/15.2.3.4.json","json/15.2.3.5.json","json/15.2.3.6.json","json/15.2.3.7.json","json/15.2.3.8.json","json/15.2.3.9.json","json/15.2.4.json","json/15.3.json","json/15.4.3.json","json/15.4.4.10.json","json/15.4.4.12.json","json/15.4.4.14.json","json/15.4.4.15.json","json/15.4.4.16.json","json/15.4.4.17.json","json/15.4.4.18.json","json/15.4.4.19.json","json/15.4.4.20.json","json/15.4.4.21.json","json/15.4.4.22.json","json/15.4.4.4.json","json/15.4.5.json","json/15.5.json","json/15.7.json","json/15.9.json"],"version":"ES5"}
|
{"date":"2011-10-03","numTests":11028,"testSuite":["json/07_Lexical_Conventions.json","json/08_Types.json","json/09_Type_Conversion.json","json/10_Execution_Contexts.json","json/11.10_Binary_Bitwise_Operators.json","json/11.11_Binary_Logical_Operators.json","json/11.12_Conditional_Operator.json","json/11.13_Assignment_Operators.json","json/11.14_Comma_Operator.json","json/11.1_Primary_Expressions.json","json/11.2_Left_Hand_Side_Expressions.json","json/11.3_PostfixExpressions.json","json/11.4_Unary_Operators.json","json/11.5_Multiplicative_Operators.json","json/11.6_Additive_Operators.json","json/11.7_Bitwise_Shift_Operators.json","json/11.8_Relational_Operators.json","json/11.9_Equality_Operators.json","json/12_Statement.json","json/13_Function_Definition.json","json/14_Program.json","json/15.10_RegExp_Objects.json","json/15.11_Error_Objects.json","json/15.12_The_JSON_Object.json","json/15.1_The_Global_Object.json","json/15.2_Object_Objects.json","json/15.3_Function_Objects.json","json/15.4_Array_Objects.json","json/15.5_String_Objects.json","json/15.6_Boolean_Objects.json","json/15.7_Number_Objects.json","json/15.8_The_Math_Object.json","json/15.9_Date_Objects.json","json/chapter07.json","json/chapter08.json","json/chapter10.json","json/chapter11.json","json/chapter12.json","json/chapter13.json","json/chapter14.json","json/15.1.json","json/15.10.json","json/15.11.json","json/15.12.json","json/15.2.3.1.json","json/15.2.3.10.json","json/15.2.3.11.json","json/15.2.3.12.json","json/15.2.3.13.json","json/15.2.3.14.json","json/15.2.3.2.json","json/15.2.3.3.json","json/15.2.3.4.json","json/15.2.3.5.json","json/15.2.3.6.json","json/15.2.3.7.json","json/15.2.3.8.json","json/15.2.3.9.json","json/15.2.4.json","json/15.3.json","json/15.4.3.json","json/15.4.4.10.json","json/15.4.4.12.json","json/15.4.4.14.json","json/15.4.4.15.json","json/15.4.4.16.json","json/15.4.4.17.json","json/15.4.4.18.json","json/15.4.4.19.json","json/15.4.4.20.json","json/15.4.4.21.json","json/15.4.4.22.json","json/15.4.4.4.json","json/15.4.5.json","json/15.5.json","json/15.7.json","json/15.9.json"],"version":"ES5"}
|
Loading…
x
Reference in New Issue
Block a user