mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 05:55:36 +02:00
Re-gen'ed website.
This commit is contained in:
parent
68e437e708
commit
6c9436f977
@ -6,7 +6,7 @@
|
|||||||
<script type="text/javascript" src="harness/sections.js"></script>
|
<script type="text/javascript" src="harness/sections.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//Globals
|
//Globals
|
||||||
var TEST_LIST_PATH = "json/default.json";
|
var TEST_LIST_PATH = "json/default.json";
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="harness/sth.js"></script>
|
<script type="text/javascript" src="harness/sth.js"></script>
|
||||||
<script type="text/javascript" src="harness/sta.js"></script>
|
<script type="text/javascript" src="harness/sta.js"></script>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/// 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:
|
||||||
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer.
|
/// the following disclaimer.
|
||||||
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
||||||
/// endorse or promote products derived from this software without specific prior written permission.
|
/// endorse or promote products derived from this software without specific prior written permission.
|
||||||
///
|
///
|
||||||
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
||||||
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||||
@ -16,13 +16,13 @@
|
|||||||
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
//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,14 +1,14 @@
|
|||||||
/// 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:
|
||||||
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer.
|
/// the following disclaimer.
|
||||||
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
||||||
/// endorse or promote products derived from this software without specific prior written permission.
|
/// endorse or promote products derived from this software without specific prior written permission.
|
||||||
///
|
///
|
||||||
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
||||||
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||||
@ -16,40 +16,68 @@
|
|||||||
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
//Global Scope Test Case Validator
|
//Global Scope Test Case Validator
|
||||||
|
|
||||||
//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 : ".");
|
(testDescrip.negative === "^((?!NotEarlyError).)*$" ?
|
||||||
|
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,
|
||||||
'fail',
|
testDescrip.path,
|
||||||
Error('No exception was thrown; expected an error "message" property matching the regular expression "' + testDescrip.negative + '".'));
|
testDescrip.description,
|
||||||
} else if (!(new RegExp(testDescrip.negative, "i").test(this.iframeError))) { //wrong type of exception thrown
|
testDescrip.code,
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
'fail',
|
||||||
'fail',
|
Error('No exception was thrown; expected an error "message"' +
|
||||||
Error('Expected an exception with a "message" property matching the regular expression "' + testDescrip.negative +'" to be thrown; actual was "' + this.iframeError + '".'));
|
' property matching the regular expression "' +
|
||||||
|
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',
|
||||||
|
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,
|
||||||
'fail',
|
testDescrip.path,
|
||||||
Error('Unexpected exception, "' + this.iframeError + '" was thrown.'));
|
testDescrip.description,
|
||||||
}
|
testDescrip.code,
|
||||||
|
'fail',
|
||||||
|
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);
|
||||||
@ -446,7 +446,7 @@ var $LocalTZ,
|
|||||||
var isSouthernHemisphere = (juneOffset > decemberOffset);
|
var isSouthernHemisphere = (juneOffset > decemberOffset);
|
||||||
var winterTime = isSouthernHemisphere ? juneDate : decemberDate;
|
var winterTime = isSouthernHemisphere ? juneDate : decemberDate;
|
||||||
var summerTime = isSouthernHemisphere ? decemberDate : juneDate;
|
var summerTime = isSouthernHemisphere ? decemberDate : juneDate;
|
||||||
|
|
||||||
var dstStart = findNearestDateBefore(winterTime, function (date) {
|
var dstStart = findNearestDateBefore(winterTime, function (date) {
|
||||||
return date.getTimezoneOffset() == summerTime.getTimezoneOffset();
|
return date.getTimezoneOffset() == summerTime.getTimezoneOffset();
|
||||||
});
|
});
|
||||||
@ -454,7 +454,7 @@ var $LocalTZ,
|
|||||||
$DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"';
|
$DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"';
|
||||||
$DST_start_hour = dstStart.getHours();
|
$DST_start_hour = dstStart.getHours();
|
||||||
$DST_start_minutes = dstStart.getMinutes();
|
$DST_start_minutes = dstStart.getMinutes();
|
||||||
|
|
||||||
var dstEnd = findNearestDateBefore(summerTime, function (date) {
|
var dstEnd = findNearestDateBefore(summerTime, function (date) {
|
||||||
return date.getTimezoneOffset() == winterTime.getTimezoneOffset();
|
return date.getTimezoneOffset() == winterTime.getTimezoneOffset();
|
||||||
});
|
});
|
||||||
@ -462,7 +462,7 @@ var $LocalTZ,
|
|||||||
$DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"';
|
$DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"';
|
||||||
$DST_end_hour = dstEnd.getHours();
|
$DST_end_hour = dstEnd.getHours();
|
||||||
$DST_end_minutes = dstEnd.getMinutes();
|
$DST_end_minutes = dstEnd.getMinutes();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
@ -503,10 +503,10 @@ function YearFromTime(t) {
|
|||||||
t = Number(t);
|
t = Number(t);
|
||||||
var sign = ( t < 0 ) ? -1 : 1;
|
var sign = ( t < 0 ) ? -1 : 1;
|
||||||
var year = ( sign < 0 ) ? 1969 : 1970;
|
var year = ( sign < 0 ) ? 1969 : 1970;
|
||||||
|
|
||||||
for(var time = 0;;year += sign){
|
for(var time = 0;;year += sign){
|
||||||
time = TimeFromYear(year);
|
time = TimeFromYear(year);
|
||||||
|
|
||||||
if(sign > 0 && time > t){
|
if(sign > 0 && time > t){
|
||||||
year -= sign;
|
year -= sign;
|
||||||
break;
|
break;
|
||||||
@ -517,11 +517,11 @@ function YearFromTime(t) {
|
|||||||
};
|
};
|
||||||
return year;
|
return year;
|
||||||
}
|
}
|
||||||
|
|
||||||
function InLeapYear(t){
|
function InLeapYear(t){
|
||||||
if(DaysInYear(YearFromTime(t)) == 365)
|
if(DaysInYear(YearFromTime(t)) == 365)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(DaysInYear(YearFromTime(t)) == 366)
|
if(DaysInYear(YearFromTime(t)) == 366)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -584,7 +584,7 @@ var LocalTZA = $LocalTZ*msPerHour;
|
|||||||
|
|
||||||
function DaysInMonth(m, leap) {
|
function DaysInMonth(m, leap) {
|
||||||
m = m%12;
|
m = m%12;
|
||||||
|
|
||||||
//April, June, Sept, Nov
|
//April, June, Sept, Nov
|
||||||
if(m == 3 || m == 5 || m == 8 || m == 10 ) {
|
if(m == 3 || m == 5 || m == 8 || m == 10 ) {
|
||||||
return 30;
|
return 30;
|
||||||
@ -601,13 +601,14 @@ 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++) {
|
||||||
tempDate = new Date(year, m, d);
|
tempDate = new Date(year, m, d);
|
||||||
if (tempDate.getDay()===0) {
|
if (tempDate.getDay()===0) {
|
||||||
return tempDate.valueOf();
|
return tempDate.valueOf();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(count==='"last"') {
|
} else if(count==='"last"') {
|
||||||
for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) {
|
for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) {
|
||||||
@ -624,7 +625,7 @@ function GetSundayInMonth(t, m, count){
|
|||||||
var year = YearFromTime(t);
|
var year = YearFromTime(t);
|
||||||
var leap = InLeapYear(t);
|
var leap = InLeapYear(t);
|
||||||
var day = 0;
|
var day = 0;
|
||||||
|
|
||||||
if(m >= 1) day += DaysInMonth(0, leap);
|
if(m >= 1) day += DaysInMonth(0, leap);
|
||||||
if(m >= 2) day += DaysInMonth(1, leap);
|
if(m >= 2) day += DaysInMonth(1, leap);
|
||||||
if(m >= 3) day += DaysInMonth(2, leap);
|
if(m >= 3) day += DaysInMonth(2, leap);
|
||||||
@ -636,25 +637,25 @@ function GetSundayInMonth(t, m, count){
|
|||||||
if(m >= 9) day += DaysInMonth(8, leap);
|
if(m >= 9) day += DaysInMonth(8, leap);
|
||||||
if(m >= 10) day += DaysInMonth(9, leap);
|
if(m >= 10) day += DaysInMonth(9, leap);
|
||||||
if(m >= 11) day += DaysInMonth(10, leap);
|
if(m >= 11) day += DaysInMonth(10, leap);
|
||||||
|
|
||||||
var month_start = TimeFromYear(year)+day*msPerDay;
|
var month_start = TimeFromYear(year)+day*msPerDay;
|
||||||
var sunday = 0;
|
var sunday = 0;
|
||||||
|
|
||||||
if(count === "last"){
|
if(count === "last"){
|
||||||
for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay;
|
for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay;
|
||||||
WeekDay(last_sunday)>0;
|
WeekDay(last_sunday)>0;
|
||||||
last_sunday -= msPerDay
|
last_sunday -= msPerDay
|
||||||
){};
|
){};
|
||||||
sunday = last_sunday;
|
sunday = last_sunday;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for(var first_sunday = month_start;
|
for(var first_sunday = month_start;
|
||||||
WeekDay(first_sunday)>0;
|
WeekDay(first_sunday)>0;
|
||||||
first_sunday += msPerDay
|
first_sunday += msPerDay
|
||||||
){};
|
){};
|
||||||
sunday = first_sunday+7*msPerDay*(count-1);
|
sunday = first_sunday+7*msPerDay*(count-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sunday;
|
return sunday;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
@ -662,11 +663,11 @@ function DaylightSavingTA(t) {
|
|||||||
// t = t-LocalTZA;
|
// t = t-LocalTZA;
|
||||||
|
|
||||||
var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) +
|
var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) +
|
||||||
$DST_start_hour*msPerHour +
|
$DST_start_hour*msPerHour +
|
||||||
$DST_start_minutes*msPerMinute;
|
$DST_start_minutes*msPerMinute;
|
||||||
|
|
||||||
var k = new Date(DST_start);
|
var k = new Date(DST_start);
|
||||||
|
|
||||||
var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) +
|
var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) +
|
||||||
$DST_end_hour*msPerHour +
|
$DST_end_hour*msPerHour +
|
||||||
$DST_end_minutes*msPerMinute;
|
$DST_end_minutes*msPerMinute;
|
||||||
@ -770,7 +771,7 @@ function MakeDate( day, time ) {
|
|||||||
if(!isFinite(day) || !isFinite(time)) {
|
if(!isFinite(day) || !isFinite(time)) {
|
||||||
return Number.NaN;
|
return Number.NaN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return day*msPerDay+time;
|
return day*msPerDay+time;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -803,20 +804,20 @@ function ConstructDate(year, month, date, hours, minutes, seconds, ms){
|
|||||||
var r1 = Number(year);
|
var r1 = Number(year);
|
||||||
var r2 = Number(month);
|
var r2 = Number(month);
|
||||||
var r3 = ((date && arguments.length > 2) ? Number(date) : 1);
|
var r3 = ((date && arguments.length > 2) ? Number(date) : 1);
|
||||||
var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0);
|
var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0);
|
||||||
var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0);
|
var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0);
|
||||||
var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0);
|
var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0);
|
||||||
var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0);
|
var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0);
|
||||||
|
|
||||||
var r8 = r1;
|
var r8 = r1;
|
||||||
|
|
||||||
if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99))
|
if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99))
|
||||||
r8 = 1900+r1;
|
r8 = 1900+r1;
|
||||||
|
|
||||||
var r9 = MakeDay(r8, r2, r3);
|
var r9 = MakeDay(r8, r2, r3);
|
||||||
var r10 = MakeTime(r4, r5, r6, r7);
|
var r10 = MakeTime(r4, r5, r6, r7);
|
||||||
var r11 = MakeDate(r9, r10);
|
var r11 = MakeDate(r9, r10);
|
||||||
|
|
||||||
return TimeClip(UTC(r11));
|
return TimeClip(UTC(r11));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,21 +43,21 @@ function BrowserRunner() {
|
|||||||
globalScopeContents,
|
globalScopeContents,
|
||||||
harnessDir = "harness/";
|
harnessDir = "harness/";
|
||||||
|
|
||||||
$.ajax({async: false,
|
$.ajax({async: false,
|
||||||
dataType: "text",
|
dataType: "text",
|
||||||
success: function(data){errorDetectorFileContents = data;},
|
success: function(data){errorDetectorFileContents = data;},
|
||||||
url:harnessDir+"ed.js"});
|
url:harnessDir+"ed.js"});
|
||||||
|
|
||||||
$.ajax({async: false,
|
$.ajax({async: false,
|
||||||
dataType: "text",
|
dataType: "text",
|
||||||
success: function(data){simpleTestAPIContents = data;},
|
success: function(data){simpleTestAPIContents = data;},
|
||||||
url:harnessDir+"sta.js"});
|
url:harnessDir+"sta.js"});
|
||||||
|
|
||||||
$.ajax({async: false,
|
$.ajax({async: false,
|
||||||
dataType: "text",
|
dataType: "text",
|
||||||
success: function(data){globalScopeContents = data;},
|
success: function(data){globalScopeContents = data;},
|
||||||
url:harnessDir+"gs.js"});
|
url:harnessDir+"gs.js"});
|
||||||
|
|
||||||
/* Called by the child window to notify that the test has
|
/* Called by the child window to notify that the test has
|
||||||
* finished. This function call is put in a separate script block
|
* finished. This function call is put in a separate script block
|
||||||
* at the end of the page so errors in the test script block
|
* at the end of the page so errors in the test script block
|
||||||
@ -180,8 +180,8 @@ 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) {
|
||||||
txt = txt.replace(/\\/g,"\\\\");
|
txt = txt.replace(/\\/g,"\\\\");
|
||||||
@ -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.
|
||||||
@ -264,7 +264,7 @@ function TestLoader() {
|
|||||||
|
|
||||||
function getIdFromPath (path) {
|
function getIdFromPath (path) {
|
||||||
//path is of the form "a/b/c.js"
|
//path is of the form "a/b/c.js"
|
||||||
|
|
||||||
var id = path.split("/");
|
var id = path.split("/");
|
||||||
//id is now of the form ["a", "b", "c.js"];
|
//id is now of the form ["a", "b", "c.js"];
|
||||||
|
|
||||||
@ -307,9 +307,9 @@ function TestLoader() {
|
|||||||
currentTestIndex = 0;
|
currentTestIndex = 0;
|
||||||
testGroupIndex = 0;
|
testGroupIndex = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Controls test generation and running, and sends results to the presenter. */
|
/* Controls test generation and running, and sends results to the presenter. */
|
||||||
@ -326,8 +326,8 @@ function Controller() {
|
|||||||
this.implementerHook = {
|
this.implementerHook = {
|
||||||
//Adds a test result
|
//Adds a test result
|
||||||
addTestResult: function (test) { },
|
addTestResult: function (test) { },
|
||||||
|
|
||||||
//Called whenever all tests have finished running. Provided with the
|
//Called whenever all tests have finished running. Provided with the
|
||||||
//elapsed time in milliseconds.
|
//elapsed time in milliseconds.
|
||||||
finished: function(elapsed) { }
|
finished: function(elapsed) { }
|
||||||
};
|
};
|
||||||
@ -337,7 +337,7 @@ function Controller() {
|
|||||||
try {
|
try {
|
||||||
controller.implementerHook.addTestResult(test);
|
controller.implementerHook.addTestResult(test);
|
||||||
} catch(e) { /*no-op*/}
|
} catch(e) { /*no-op*/}
|
||||||
|
|
||||||
if(state === 'running')
|
if(state === 'running')
|
||||||
setTimeout(loader.getNextTest, 10);
|
setTimeout(loader.getNextTest, 10);
|
||||||
};
|
};
|
||||||
@ -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